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");
}
}
+-+-+
+-+-
+-+
+-
+
|
|
Total comments: 0 | |