We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aaea50a commit 1490f07Copy full SHA for 1490f07
Sand_glass_pattern.cpp
@@ -0,0 +1,34 @@
1
+#include<iostream>
2
+using namespace std;
3
+
4
+int main(){
5
+ int n=5,i,k,j;
6
7
+ for(i=n;i>=1;i--){ //outer loop
8
9
+ for(k=n-1;k>=i;k--){
10
+ cout<<" "; //spacing
11
+ }
12
13
+ for(j=i;j>=1;j--){ //inner loop
14
+ cout<<"* ";
15
16
+ cout<<endl;
17
18
19
20
+ for(i=1;i<=5;i++){ //outer loop
21
22
+ for(k=i;k<n;k++){
23
24
25
26
+ for(j=1;j<=i;j++){ //inner loop
27
28
29
30
31
32
33
+ return 0;
34
+}
0 commit comments