C
This commit is contained in:
22
DeitelC/Chapter4/1to20.c
Normal file
22
DeitelC/Chapter4/1to20.c
Normal file
@ -0,0 +1,22 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main(void){
|
||||
int counter = 1;
|
||||
while(counter<= 20) {
|
||||
if(counter%5==0) {
|
||||
printf("%d\t",counter);
|
||||
counter++;
|
||||
} else {
|
||||
counter++;
|
||||
}
|
||||
}
|
||||
printf("\n");
|
||||
for(int x = 1; x<=20 ;++x) {
|
||||
if (x%5==0) {
|
||||
printf("%d\t", x);
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user