You are viewing a single comment's thread. Return to all comments →
int main() { int a, b,i=0,j=0; scanf("%d\n%d", &a, &b); // Complete the code. for(i=0,j=0;i<=a,j<=b,i++,j++) { if(i==a) printf("one"); if(i==a) printf("two"); if(i==a) printf("three"); if(i==a) printf("four"); if(i==a) printf("five"); if(i==a) printf("six"); if(i==a) printf("seven"); if(i==a) printf("eight"); if(i==a) printf("nine"); if(i==b) printf("one"); if(i==b) printf("two"); if(i==b) printf("three"); if(i==b) printf("four"); if(i==b) printf("five"); if(i==b) printf("six"); if(i==b) printf("seven"); if(i==b) printf("eight"); if(i==b) printf("nine"); else { printf("nine"); } else if(a>9) printf("even"); else if(b>9) return 0; }
Seems like cookies are disabled on this browser, please enable them to open this website
For Loop in C
You are viewing a single comment's thread. Return to all comments →
include
include
include
include
int main() { int a, b,i=0,j=0; scanf("%d\n%d", &a, &b); // Complete the code. for(i=0,j=0;i<=a,j<=b,i++,j++) { if(i==a) printf("one"); if(i==a) printf("two"); if(i==a) printf("three"); if(i==a) printf("four"); if(i==a) printf("five"); if(i==a) printf("six"); if(i==a) printf("seven"); if(i==a) printf("eight"); if(i==a) printf("nine"); if(i==b) printf("one"); if(i==b) printf("two"); if(i==b) printf("three"); if(i==b) printf("four"); if(i==b) printf("five"); if(i==b) printf("six"); if(i==b) printf("seven"); if(i==b) printf("eight"); if(i==b) printf("nine"); else { printf("nine"); } else if(a>9) printf("even"); else if(b>9) return 0; }