Okay I'm just writing a short piece of code to figure out a math problem
It compiles fine but it gives me the runtime error up to the part that inputs the data then crashes. Similary if i just put 1 statement in the main like "cout<<"blah"<<endl; then it still crashes:Code:#include <iostream.h> void main() { int num; int num2; int sum=0; cout<<"Enter num: "; cin>>num; num2=num*2; for (int i=1; i<num2; i++) { if (num2%i==0 && num%i!=0) { sum+=i; } } cout<<sum<<endl; }
Code:Loaded 'ntdll.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\kernel32.dll', no matching symbolic information found. The thread 0x7C4 has exited with code 4373080 (0x42BA58). The program 'D:\C++\MathTesting\Debug\test.exe' has exited with code 4373080 (0x42BA58).



LinkBack URL
About LinkBacks



