sign up I login
 advanced
refer a friend - earn nickels!!

Ask & Discuss Questions with Community & Experts

Moderation Team
 90 chars left    advanced
Ask iit jee aieee pet cbse icse state board community Community Discussion Question: how to execute a loop
Forum Index -> Computer Science like the article? email it to a friend.  
Author Message
gaurav23 (0)

New kid on the Block

Olaaa!! Perrrfect answer. 0  [0 rates]

gaurav23's Avatar

total posts: 14    
offline Offline
how to execute a loop
    
rudra.panda (2155)

Blazing goIITian

Olaaa!! Perrrfect answer. 365  [530 rates]

rudra.panda's Avatar

total posts: 2307    
offline Offline
Sorry i didn't get you can you please explain the question a bit please.

God does not care about our mathematical difficulties. He integrates empirically. ~~~Albert Einstein (1879-1955)~~~~
To divide a cube into two other cubes, a fourth power or in general any power whatever into two powers of the same denomination above the second is impossible, and I have assuredly found an admirable proof of this, but the margin is too narrow to contain it.~~~Pierre de Fermat (1601-1665)~~~
 this reply: 0 points  (with Olaaa!! Perrrfect answer.   in 0 votes )   [?]
 
You have to be logged on to rate
  
littledoll (34)

Cool goIITian

Olaaa!! Perrrfect answer. 6  [8 rates]

littledoll's Avatar

total posts: 71    
offline Offline

hmm.... 4 vich language..... juss say tht

 this reply: 0 points  (with Olaaa!! Perrrfect answer.   in 0 votes )   [?]
 
You have to be logged on to rate
  
deedee (1715)

Blazing goIITian

Olaaa!! Perrrfect answer. 283  [433 rates]

deedee's Avatar

total posts: 904    
offline Offline

c wap to print or just read nos less then 10 frm user




 


so




 


in this u can use a for loop




 


d program goes




 


void main()




 


{




 


clrscr();




 


int i;




 


for(i=0;i<10;i++)




 


{




 


cin>>i;




 


cout<<i<<"/n";




 


}




 


so here first it will hav d value zero then it will print zero ,then till will incremnt d value and it will b 1 then it will check for d condition ie wthere 1 is less then 10 if yes it will print it .and so on .




 


once it reaches 10 then it will check for d condition ie whethr 10 is less then 10 wich is fasle thus d xecution of loop will b terminated and d control will b shiftd to d next line




 


this was a basic program u can even try it for better once ...




 


hope it helps ....


don't walk as if u rule d world
walk as if u dont care who rules d world

-this is knw as attitude


B who u r and say wat u feel ......
coz those who mind don't matter ........
and those who matter dont mind ......... :)


 this reply: 0 points  (with Olaaa!! Perrrfect answer.   in 0 votes )   [?]
 
You have to be logged on to rate
  
achman (58)

Hot goIITian

Olaaa!! Perrrfect answer. 10  [14 rates]

achman's Avatar

total posts: 127    
offline Offline

there are 2 types of loops:


1)entry controlled(for and while)


2)exit controlled(do-while)


for loop:


for(initialising value;condition;updation value)


{


//body of loop


}


while loop:


while(condition)


{


//body of loop


}


do-while loop


do


{


//body of loop


}


while(condition);


 

 this reply: 0 points  (with Olaaa!! Perrrfect answer.   in 0 votes )   [?]
 
You have to be logged on to rate
  
mathwiz (46)

Hot goIITian

Olaaa!! Perrrfect answer. 8  [11 rates]

mathwiz's Avatar

total posts: 168    
offline Offline
can u make the question a more specific one?
 this reply: 0 points  (with Olaaa!! Perrrfect answer.   in 0 votes )   [?]
 
You have to be logged on to rate
  
 
Forum Index -> Computer Science
Go to:   

Top Offers for goIITians
Correspondence Courses
Brilliant Tutorials
Narayana Institute
Aakash Institute
Classroom/Crash Courses
Narayana - Kota , Delhi , Others
Brilliant Tutorials - Class , Crash
Aakash Institute - Medical , Engg
Online Test Series
Brilliant Tutorials
Narayana Institute
Aakash Institute
Mahesh Tutorials
AMITY      Sri Chaitanya