-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path10for_while_dowhile_loops.cpp
More file actions
52 lines (44 loc) · 901 Bytes
/
10for_while_dowhile_loops.cpp
File metadata and controls
52 lines (44 loc) · 901 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
42
43
44
45
46
47
48
49
50
51
52
#include<iostream>
#include<iomanip>
using namespace std;
int main(){
// int i=1;
// cout<<i;
// i++;
// cout<<i;
// i++;
// cout<<i;
// i++;
// cout<<i;
// i++;
// cout<<i;
// i++;
//*****for loop in c++****
// for(int i=1; i<=40; i++) //for(initialization; condition; updation)
// // {loop body(C++ code)}
// {
// cout<<i<<endl;
// }
// //infinite loop
// for(int i=1; 30<=40; i++)
// {
// cout<<i<<endl;
// }
//*******while loop*****
// int i=1;
// while(i<=40){
// cout<<i<<endl;
// i++;
// }
// do while loop
// int i=6;
// do{
// cout<<i<<endl;
// i= i+6;
// }while(i<=36);
for( int i=1; i<=10; i++)
{
cout<<i*6<<endl;
}
return 0;
}