How to write a C Program if - while - for Example in C Programming Language ?
Solution For C Program :
//C Program if - while - for Example.
#include <stdio.h>
int main(){
/*
int i = 1;
if( i == 1 ){
printf("Happy Birthday! %d\n", i);
}
*/
/*
int i = 1;
while( i <= 23 ){
printf("Happy Birthday! %d\n", i);
i++; // i = i + 1;
}
*/
int i;
for( i = 1 ; i <= 23 ; i++ ){
printf("Happy Birthday! %d\n", i);
}
return 0;
}