Question



 DEVELOP > c-Plus-Plus > Question

LINK TO THIS PAGE  


rating :  0   |  0


  Page 1 of 1
Topic: DEVELOP > c-Plus-Plus
User: "Venkat"
Date: 26 Aug 2004 08:45:02 AM
Object: Question
Hi All,
I have the following problem please help me in solving this.
#include <stdafx>
main()
{
int i, n=20;
for(i=0;i<n; i--)
{
printf(i);
}
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 <stdafx>
main()
{
int i, n=20;
for(i=0;i<n; n--)
{
printf(i);
}
Can someone crack the other 2 possibilities.
regards,
Venkat
.

 

NEWER

pg.1232     pg.940     pg.716     pg.544     pg.412     pg.311     pg.234     pg.175     pg.130     pg.96     pg.70     pg.50     pg.35     pg.24     pg.16     pg.10     pg.6     pg.3     pg.1

OLDER