[My site ]
Main » 2013 » December » 13 » 2007-2008 question 5
0:16 AM
2007-2008 question 5
what is the output of

#include"stdio.h"
main()
{
int i, j;
for(i=5;i>=1;i--){
for(j=1;j<=i;j++)
if(j%2==0)
printf("-");
else
printf("+");
printf("\n");
}
}

+-+-+
+-+-
+-+
+-
+

Category: C Programming - 1 | Views: 440 | Added by: ahansaary | Rating: 0.0/0
Total comments: 0
Only registered users can add comments.
[ Sign Up | Login ]