| You are Unregistered, please register to gain Full access. |
|
![]() |
|
|||||||
| Notices |
ProgrammingDiscuss Programming at the Student Zone; *edit...i figured out what was wrong with that program but would appreciate if anyone thats ... |
![]() |
|
|
Thread Tools |
|
||||
|
Programming
*edit...i figured out what was wrong with that program
but would appreciate if anyone thats involved in C++ Programming.. could help me writing another program - we have to write a program to list all the numbers from 112 to 212 along with the cumulative total.. i just need some guidance..plz Last edited by EntangleDesi; 12-02-2007 at 12:57 AM. |
| Sponsored Links |
|
|||
|
c++ program help
hey man what you got to do is :
take one variable i start for loop where i=112 and end up with 212 and just write down following thing j=j+i; and print j at end you will get total of that all number i think you probably know which data type you should select because that is going to be big amount... dont forget to declare j out side of the loop as 0 otherwise be problem |
|
|||
|
int fromValue=112;
int toValue=212; int sumTotal=0; for(fromValue=112;fromValue<=toValue;fromValue++){ use printstatement c.out on fromValue sumTotal = sumTotal+fromValue; } use printstatement c.out on sumTotal |
|
||||
|
^^thanks guys
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Computer Programming Song | NInA | Desi Noke Joke | 6 | 09-15-2008 05:21 PM |