-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathwhile.c
74 lines (57 loc) · 1.34 KB
/
while.c
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#include<stdio.h>
int main()
{
// initialization ,condition , inc/dec
// int step=1; //initialization
// while (step<=10) //condition
// {
// printf(" %d. Aman Tiwari \n",step);
// step++; //increment
// }
// while (1) //infinite while loop
// {
// printf("Hello sir \n");
// }
// int step=10;
// while (step>0)
// {
// printf("%d Hello Sir\n",step);
// step--;
// }
// int num=1;
// // while (1) //infinite while loop
// while(num<=10)
// {
// printf("%d ",num);
// num++;
// }
// int num2=100;
// while(num2>0)
// {
// printf("%d\n",num2);
// num2--;
// }
// int term;
// printf("enter term :");
// scanf("%d",&term);//let term=10
// int i;
// for ( i = term; i > 0; i--)
// {
// printf(" %d ",i);
// }
// while (term>0)
// {
// printf(" %d ",term);
// term--;
// }
return 0;
}
//1-100
//100 - 1
// print you name 25 time
// table printing
// armstrong , reverse
//do with all type of loops
// 153 => 1 * 1 * 1 + 5*5*5 + 3*3*3 => 27 + 125 + 1 => 153 armstrong no.
//153 => 351
// 351 = 1*1*1+ 5*5*5+3*3*3 => 153 not a armstrong no.