freelanceprogrammers.org Forum Index » C
replay to krishna_sicsr" <krishna_sicsr@yahoo.com>
Joined: 04 Feb 2005
Posts: 2
replay to krishna_sicsr" <krishna_sicsr@yahoo.com>
Message: 3
Date: Tue, 01 Feb 2005 07:09:43 -0000
From: "krishna_sicsr" <krishna_sicsr@...>
Subject: Solve this Query.....
hello friends,
i have a problem that my one friend has given me a statement
main()
{
int i,n=20;
for(i=0;i<n;i--)
{
cout<<"-";
}
}
u have to print this sign (-) 20 times with only one changes in the
above problem
this can be solver as
main()
{
int i,n=20;
for(i=0;-i<n;i--)
{
cout<<"-";
}
}
OR
main()
{
int i,n=20;
for(i=0;i<n;n--)
{
cout<<"-";
}
}
All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
China Wholesale - Electronics Products
Character Studio - Tutorials and Help
China Wholesale - Electronics Products
Character Studio - Tutorials and Help







