C++ program of inline function to print rhombus star pattern
Write a C++ program to print rhombus star pattern of Number of rows using inline function.
C++ program to print rhombus star pattern of Number of rows using inline function.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #include<iostream> using namespace std; class T4Tutorials { protected : int i,j,k,n; public : fun(); }; inline T4Tutorials::fun() { cout<<"Enter Number of rows : "; cin>>n; for(i=1 ; i<=n ; i++) { for(k=1 ;k<=n-i; k++) { cout<<" "; } for(j=1 ; j<=n ; j++) { cout<<"*"; } cout<<endl; } } int main() { T4Tutorials a; a.fun(); } |
Output
How to print rhombus or parallelogram star pattern using inline function in C++ programming.
The Logic to print rhombus or parallelogram star pattern series in C++ using inline function.