+ 1
whats the wrong with this code?
#include<stdio.h> #include<conio.h> Int main() { int i,j; clrscr(); for(i=1;i<=11;i+2) { for(j=1;j<=i;j++) { printf("*"); } printf("\n"); } return 0; } i think the output is * //1 *** //3 ***** //5 ******* : *********. : but its not working help me!
3 Réponses
+ 13
Take a look at this :
https://code.sololearn.com/cNcyHJ1fc3Oa/?ref=app
+ 4
#include<stdio.h>
#include<conio.h>
int main()
{
int i,j;
for(i=1;i<=11;i+=2)
{
printf("\n");
for(j=1;j<=i;j++)
{
printf("*");
}
}
return 0;
}
The above code works. Try this
[EDIT] : I'm sorry I didn't noticed that is an odd iteration. Modified the code so that it can iterate as you like atharupu saravana
+ 3
atharupu saravana
I think you're working with Turbo C
Here in Sololearn you need not want to specify clrscr();
And the biggest mistake you made is writing Int main() in the int main() and Return 0; in the place of return 0;
I think you know C is a case sensitive language