V
Venkat
Hi All,
I have the following problem please help me in solving this.
#include <stdio.h>
main()
{
int i, n=20;
for(i=0;i<n; i--)
{
printf("-");
}
}
Only one character in the above needs to be modified such that the character
'-' will be printed 20 times.
People say there are 3 ways of doing it but i could figure out only one way
given below.
#include <stdio.h>
main()
{
int i, n=20;
for(i=0;i<n; n--)
{
printf("-");
}
}
Can someone crack the other 2 possibilities.
regards,
Venkat
I have the following problem please help me in solving this.
#include <stdio.h>
main()
{
int i, n=20;
for(i=0;i<n; i--)
{
printf("-");
}
}
Only one character in the above needs to be modified such that the character
'-' will be printed 20 times.
People say there are 3 ways of doing it but i could figure out only one way
given below.
#include <stdio.h>
main()
{
int i, n=20;
for(i=0;i<n; n--)
{
printf("-");
}
}
Can someone crack the other 2 possibilities.
regards,
Venkat