Click here to Skip to main content
15,920,602 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to unlock locked file using Win32 API? Pin
Stuart Dootson11-Sep-09 21:37
professionalStuart Dootson11-Sep-09 21:37 
AnswerRe: How to unlock locked file using Win32 API? Pin
kilt14-Sep-09 2:21
kilt14-Sep-09 2:21 
QuestionBeginner's Question 2 Pin
UKM_Student11-Sep-09 4:37
UKM_Student11-Sep-09 4:37 
AnswerRe: Beginner's Question 2 Pin
David Crow11-Sep-09 4:41
David Crow11-Sep-09 4:41 
GeneralRe: Beginner's Question 2 Pin
UKM_Student11-Sep-09 4:44
UKM_Student11-Sep-09 4:44 
GeneralRe: Beginner's Question 2 Pin
David Crow11-Sep-09 4:48
David Crow11-Sep-09 4:48 
GeneralRe: Beginner's Question 2 Pin
UKM_Student11-Sep-09 4:56
UKM_Student11-Sep-09 4:56 
GeneralRe: Beginner's Question 2 Pin
UKM_Student11-Sep-09 4:55
UKM_Student11-Sep-09 4:55 
why is it wrong?For eg.



#include<iostream>
using namespace std;
int main()
{
int total=0,count=0,number;



while(count<5)
{
cout<<"Input 5 numbers.";
cin>>number;
total=total+number;
count++;
}
cout<<"Total is "<<total<<endl;

return 0;
}


From here we can see that the compiler adds up all the 5 numbers.My question is how should i put it so it would display" total: N1+N2+N3+N4+N5=XX "instead of adding all the numbers up then display "total:XX"
GeneralRe: Beginner's Question 2 Pin
David Crow11-Sep-09 5:13
David Crow11-Sep-09 5:13 
GeneralRe: Beginner's Question 2 Pin
UKM_Student11-Sep-09 5:23
UKM_Student11-Sep-09 5:23 
GeneralRe: Beginner's Question 2 Pin
Richard MacCutchan11-Sep-09 5:28
mveRichard MacCutchan11-Sep-09 5:28 
GeneralRe: Beginner's Question 2 Pin
UKM_Student13-Sep-09 4:34
UKM_Student13-Sep-09 4:34 
GeneralRe: Beginner's Question 2 Pin
Richard MacCutchan13-Sep-09 4:58
mveRichard MacCutchan13-Sep-09 4:58 
GeneralRe: Beginner's Question 2 Pin
UKM_Student13-Sep-09 23:48
UKM_Student13-Sep-09 23:48 
QuestionRe: Beginner's Question 2 Pin
David Crow11-Sep-09 5:40
David Crow11-Sep-09 5:40 
AnswerRe: Beginner's Question 2 Pin
UKM_Student11-Sep-09 5:45
UKM_Student11-Sep-09 5:45 
QuestionRe: Beginner's Question 2 Pin
David Crow11-Sep-09 5:54
David Crow11-Sep-09 5:54 
AnswerRe: Beginner's Question 2 Pin
UKM_Student11-Sep-09 6:16
UKM_Student11-Sep-09 6:16 
QuestionRe: Beginner's Question 2 Pin
David Crow11-Sep-09 6:21
David Crow11-Sep-09 6:21 
AnswerRe: Beginner's Question 2 Pin
UKM_Student11-Sep-09 6:26
UKM_Student11-Sep-09 6:26 
GeneralRe: Beginner's Question 2 Pin
David Crow11-Sep-09 6:32
David Crow11-Sep-09 6:32 
GeneralRe: Beginner's Question 2 Pin
UKM_Student11-Sep-09 6:38
UKM_Student11-Sep-09 6:38 
GeneralRe: Beginner's Question 2 Pin
UKM_Student11-Sep-09 5:27
UKM_Student11-Sep-09 5:27 
QuestionRe: Beginner's Question 2 Pin
David Crow11-Sep-09 5:35
David Crow11-Sep-09 5:35 
AnswerRe: Beginner's Question 2 Pin
UKM_Student11-Sep-09 5:44
UKM_Student11-Sep-09 5:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.