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 (2802)

Blazing goIITian

Olaaa!! Perrrfect answer. 480  [681 rates]

rudra.panda's Avatar

total posts: 2619    
offline Offline
Sorry i didn't get you can you please explain the question a bit please.
 this reply: 0 points  (with Olaaa!! Perrrfect answer.   in 0 votes )   [?]
 
You have to be logged on to rate
  
littledoll (39)

Cool goIITian

Olaaa!! Perrrfect answer. 7  [9 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 (2203)

Blazing goIITian

Olaaa!! Perrrfect answer. 365  [554 rates]

deedee's Avatar

total posts: 1152    
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:   

 Aakash Institute IIT/ AIEEE/ Medical Crash Course
Name  
E-mail  
Phone  
Mobile  
** Hurry. Exclusive goIIT Offer. Limited Seats Only!
available in: New Delhi, Amritsar, Bhatinda, Bokaro, Chandigarj, Dehradun, Guwhati, Hyderabad, Indore, Jaipur, Kanpur, Karnal, Kolkata, Kota, Lucknow, Ludhiana, Mumbai, Noida, Patiala, Patna, Pune, Ranchi, Varanasi
Top Offers for goIITians
Correspondence Courses
Brilliant Tutorials
Narayana Institute
Aakash Institute
Classroom/Crash Courses
Aakash-IITJEE : AIEEE
Aakash-IITJEE : DCE
Aakash-IITJEE : MHTCET
Aakash Institute : AIPMT
Online Test Series
Brilliant Tutorials
Narayana Institute
Aakash Institute
Mahesh Tutorials
AMITY      Sri Chaitanya