Total members 9952 | Gratitudes |It is currently Sat Feb 11, 2012 3:02 pm Login / Join Codemiles


All times are UTC [ DST ]




Post new topic Reply to topic  Quick reply  [ 5 posts ] 
Author Question
 Question subject: I NEED SOME HELP IN THE FOR LOOP PLZ .. IAM JUST A BEGINNER
PostPosted: Wed Apr 22, 2009 4:34 pm 
Offline
Newbie
User avatar

Joined: Wed Apr 22, 2009 4:26 pm
Posts: 2
Has thanked: 0 time
Have thanks: 0 time

Please guys i need ur help wiz that .... am kinda a beginner in c++ .. :)

and i need to write that program with JUST " ONE " FOR LOOP that outputs these sequence of numbers

" 6 8 11 15 16 21 22 26 29 31 "

any help would be really appreciated .. :) !! :gOOd:


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: I NEED SOME HELP IN THE FOR LOOP PLZ .. IAM JUST A BEGINNER
PostPosted: Fri Apr 24, 2009 10:18 am 
Offline
Newbie
User avatar

Joined: Fri Apr 24, 2009 9:56 am
Posts: 1
Has thanked: 0 time
Have thanks: 0 time
I think u can write for loop for your logic like this
for(int i=5;i<=31;i+2)
{
printf("%d",i);
i++;
}


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: I NEED SOME HELP IN THE FOR LOOP PLZ .. IAM JUST A BEGINNER
PostPosted: Fri Apr 24, 2009 8:29 pm 
Offline
Newbie
User avatar

Joined: Fri Apr 24, 2009 8:17 pm
Posts: 2
Location: Colorado Springs, CO USA
Has thanked: 0 time
Have thanks: 0 time
sureshbabu,

Your code would return the following sequence: 5 8 11 14 17 20 23 26 29. It is essentially
Code:
for(int i=5; i<=31; i+3)
{...}


I wish I could figure out the sequence for you. Sorry.


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: I NEED SOME HELP IN THE FOR LOOP PLZ .. IAM JUST A BEGINNER
PostPosted: Sat Apr 25, 2009 2:28 pm 
Offline
Newbie
User avatar

Joined: Wed Apr 22, 2009 4:26 pm
Posts: 2
Has thanked: 0 time
Have thanks: 0 time
:blush: thanks fellows for ur help , !! but i really need some professional's help here :S :( ....

would i find some!


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: I NEED SOME HELP IN THE FOR LOOP PLZ .. IAM JUST A BEGINNER
PostPosted: Tue Apr 28, 2009 12:20 am 
Offline
Moderator
User avatar

Joined: Fri Nov 21, 2008 6:18 pm
Posts: 51
Location: thessaloniki
Has thanked: 0 time
Have thanks: 2 time
think a number for exaple a gcd between those numbers and think how you gonna make the div with it so you get that numbers this is one way.just a thought ...make an effort

_________________
if you want make an effort yourself no one will make it for you...
best regards


TOP
 Profile Send private message  
Reply with quote  
Post new topic Reply to topic Quick reply  [ 5 posts ] 
Quick reply


  


 Similar topics
 Topic title   Forum   Author   Comments 
 Why will my loop does not work  C-C++  atoivan  0
 do while loop and for loop C++ example help.  C-C++  sakorian  2
 Need help with code for a while loop program  Java  cathyd0890  4
 java loop at end of code ... soooo close i hope  Java  seaplus  0
 Need HELP- I am a beginner in Java  Java  PapakEliminator  1

All times are UTC [ DST ]


Users browsing similar posts

Users browsing this forum: No registered users and 1 guest



Jump to:  
Previous Question | Next Question 




Home
General Talks
Finished Projects
Code Library
Games
Tutorials

Java
C/C++
C-sharp
php
Script
JSP/Servlets
Ajax
ASP/ASP.net
Google SEO
Database
Communications
Phpbb3 styles
Photoshop tutorials
Flash tutorials
Find a job






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team