-
Notifications
You must be signed in to change notification settings - Fork 0
/
hello.c
95 lines (70 loc) · 1.93 KB
/
hello.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
// //Q: 5,3,1 (Reverse output)
// #include<stdio.h>
// int main(){
// int i;
// for (i = 5; i>=1;i=i-2){
// printf("%d\t",i);
// }
// return 0;
// }
// //output: 5 , 3, 2, 1
// //Q:20,17,14,....11 (sum)
// #include<stdio.h>
// int main(){
// int i;
// int sum = 0;
// for (i = 20; i>=10;i=i-3){
// sum = sum + i;
// }
// printf("%d",sum);
// return 0;
// }
// // //Q: ৩০ থেকে ৫ এর মধ্যে ৩ এবং ৫ দ্বারা বিভাজ্য সংখ্যাগুলো মানের অধঃক্রমানুসারে সাজাও(বড় থেকে ছোট)
// // //sorting: ascending,descending
// #include<stdio.h>
// int main(){
// int i;
// for (i = 30; i>=5;i--){
// if(i%3==0 && i%5==0){
// printf("%d\t",i);
// }
// }
// return 0;
// }
// //output: 30 , 15
// // Arithmetic series (সমান্তর ধারা নির্ণয়):
// // Host by Mustafa Rahman
// #include <stdio.h>
// int main() {
// int n, d, i, current_term;
// printf("Enter the number of terms in the series: ");
// scanf("%d", &n);
// printf("Enter the common difference: ");
// scanf("%d", &d);
// current_term = 0;
// printf("The arithmetic series is: ");
// for (i = 1; i <= n; i++) {
// printf("%d ", current_term);
// current_term += d;
// }
// return 0;
// }
// // Geometric series (গুনোত্তর ধারা নির্ণয়):
// // Host by Mustafa Rahman
// #include <stdio.h>
// int main()
// {
// int n, r, i, current_term;
// printf("Enter the number of terms in the series: ");
// scanf("%d", &n);
// printf("Enter the common ratio: ");
// scanf("%d", &r);
// current_term = 1;
// printf("The geometric series is: ");
// for (i = 1; i <= n; i++)
// {
// printf("%d ", current_term);
// current_term *= r;
// }
// return 0;
// }