Before seeing the solution make sure that you tried enough. Don’t paste the whole code, just find out the logic. If you stuck in trouble, just inform me on comment.
/**Bismillahir Rahmanir Rahim.**/ #include <stdio.h> int main() { int I,J; for(I=1,J=60;J>=0;I=I+3,J=J-5) printf("I=%d J=%d\n",I,J); return 0; }
genius vai
ReplyDeletewhy this method is not working bro?:(
ReplyDelete#include
int main()
{
int I=1,J=60;
while(J!=0)
{
printf("I=%d J=%d\n",I=I+3,J=J-5);
}
return 0;
}
#include
ReplyDeleteint main()
{
int I=1,J=60;
do
{
printf("I=%d J=%d\n",I,J);
I=I+3;
J=J-5;
}
while(J!=0);
printf("I=%d J=%d\n",I,J);
I=I+3;
J=J-5;
return 0;
}
#include
ReplyDeleteint main()
{
int I,J;
for(I=1,J=60;J>=0;I=I+3,J=J-5)
printf("I=%d J=%d\n",I,J);
return 0;
}
//my code is work as well but the uri won't accept me :)
ReplyDeleteint temp;
for(int i = 1; i <= 40; i+=3){
for (int j = 60; j >= 0; j-=5){
if (j >= temp){
continue;
}
temp = j;
break;
}
}