-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathl3.cpp
More file actions
41 lines (41 loc) · 750 Bytes
/
l3.cpp
File metadata and controls
41 lines (41 loc) · 750 Bytes
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
32
33
34
35
36
37
38
39
40
41
#include <iostream>
using namespace std;
int main(){
// int a = 6;
// int b = 7;
// if(a>b){
// cout<<"a is greater than b";
// }
// else{
// cout<<"b is greater than a";
// }
// cout << "The value of a is:"<<a;
//int a, b;
// //cin>> a >>b;
// cout<<"The value of a and b is" << a <<" " <<b;
// a = cin.get();// a = '1';
// cout<< "The value of a is"<<a;
// pattern printing;
int n;
cin>>n;
// int i = 1;
// while (i<=n){
// int j = 1;
// while(j<=n){
// cout<<"*";
// j++;
// }
// cout<<endl;
// i++;
// }
int i = 1;
while(i<=n){
int j = 1;
while(j<=i){
cout<<"*";
j++;
}
cout<<endl;
i++;
}
}