| | |
C++ program help please........
Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Aug 2006
Posts: 9
Reputation:
Solved Threads: 0
I am having difficulty running this program. I am using Windows XP along with Microsoft Visual Studio.Net 2003.
The error message I get is:
Unable to start debugging system could not find exe.file
Error: C2109
Fatal Error: C1075
I need to use a while loop to take the number that the user inputs and add that number to all the numbers that preceed it and output the sum of the numbers.
Thanks for your help!
T
The error message I get is:
Unable to start debugging system could not find exe.file
Error: C2109
Fatal Error: C1075
I need to use a while loop to take the number that the user inputs and add that number to all the numbers that preceed it and output the sum of the numbers.
C++ Syntax (Toggle Plain Text)
// 3 2.cpp : Defines the entry point for the console application. //#include "stdafx.h" #include <iostream> using std::cin; using std::cout; using std::endl; int _tmain(int argc, _TCHAR* argv[]) {int sum=0; int count=0; cout<< "This program will take any number you enter,/n then it will add all numbers leading up to this number /n to include the number giving you the sum./n Please enter a number"; cin>>count; for(int i=1;i<=count;i++) sum+=i; cout<<endl <<"The sum of the numbers 1 to "<<count <<"is "<<sum<<endl; return 0; }
Thanks for your help!
T
![]() |
Similar Threads
- Playing .Wav/MIDI files in a Visual Basic Program (Visual Basic 4 / 5 / 6)
- What's the HARDEST program you've written? (Computer Science)
- Cool little Program to disable startup programs (Windows NT / 2000 / XP)
- Program is shutting down right after program is executed (C++)
- 3d Program (Game Development)
Other Threads in the C++ Forum
- Previous Thread: Float Help
- Next Thread: c++ array using a for loop
| Thread Tools | Search this Thread |
add api array arrays beginner binary bitmap c++ c/c++ calculator char class classes code coding compile compiler console conversion count data database delete desktop developer directshow dll encryption error file forms fstream function functions game generator getline google graph homeworkhelper iamthwee ifstream image input int integer java lib linkedlist linux loop looping loops map math matrix memory microsoft multidimensional multiple newbie news node number output parameter pointer problem program programming project proxy python random read recursion recursive return string strings struct studio template templates test text tree unix url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






