Click here to Skip to main content
15,569,644 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to unlock locked file using Win32 API? Pin
Stuart Dootson11-Sep-09 22:37
professionalStuart Dootson11-Sep-09 22:37 
AnswerRe: How to unlock locked file using Win32 API? Pin
kilt14-Sep-09 3:21
kilt14-Sep-09 3:21 
QuestionBeginner's Question 2 Pin
UKM_Student11-Sep-09 5:37
UKM_Student11-Sep-09 5:37 
AnswerRe: Beginner's Question 2 Pin
David Crow11-Sep-09 5:41
David Crow11-Sep-09 5:41 
GeneralRe: Beginner's Question 2 Pin
UKM_Student11-Sep-09 5:44
UKM_Student11-Sep-09 5:44 
GeneralRe: Beginner's Question 2 Pin
David Crow11-Sep-09 5:48
David Crow11-Sep-09 5:48 
GeneralRe: Beginner's Question 2 Pin
UKM_Student11-Sep-09 5:56
UKM_Student11-Sep-09 5:56 
GeneralRe: Beginner's Question 2 Pin
UKM_Student11-Sep-09 5:55
UKM_Student11-Sep-09 5: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 6:13
David Crow11-Sep-09 6:13 
GeneralRe: Beginner's Question 2 Pin
UKM_Student11-Sep-09 6:23
UKM_Student11-Sep-09 6:23 
GeneralRe: Beginner's Question 2 Pin
Richard MacCutchan11-Sep-09 6:28
mveRichard MacCutchan11-Sep-09 6:28 
GeneralRe: Beginner's Question 2 Pin
UKM_Student13-Sep-09 5:34
UKM_Student13-Sep-09 5:34 
GeneralRe: Beginner's Question 2 Pin
Richard MacCutchan13-Sep-09 5:58
mveRichard MacCutchan13-Sep-09 5:58 
GeneralRe: Beginner's Question 2 Pin
UKM_Student14-Sep-09 0:48
UKM_Student14-Sep-09 0:48 
QuestionRe: Beginner's Question 2 Pin
David Crow11-Sep-09 6:40
David Crow11-Sep-09 6:40 
AnswerRe: Beginner's Question 2 Pin
UKM_Student11-Sep-09 6:45
UKM_Student11-Sep-09 6:45 
QuestionRe: Beginner's Question 2 Pin
David Crow11-Sep-09 6:54
David Crow11-Sep-09 6:54 
AnswerRe: Beginner's Question 2 Pin
UKM_Student11-Sep-09 7:16
UKM_Student11-Sep-09 7:16 
QuestionRe: Beginner's Question 2 Pin
David Crow11-Sep-09 7:21
David Crow11-Sep-09 7:21 
AnswerRe: Beginner's Question 2 Pin
UKM_Student11-Sep-09 7:26
UKM_Student11-Sep-09 7:26 
GeneralRe: Beginner's Question 2 Pin
David Crow11-Sep-09 7:32
David Crow11-Sep-09 7:32 
GeneralRe: Beginner's Question 2 Pin
UKM_Student11-Sep-09 7:38
UKM_Student11-Sep-09 7:38 
GeneralRe: Beginner's Question 2 Pin
UKM_Student11-Sep-09 6:27
UKM_Student11-Sep-09 6:27 
QuestionRe: Beginner's Question 2 Pin
David Crow11-Sep-09 6:35
David Crow11-Sep-09 6:35 
AnswerRe: Beginner's Question 2 Pin
UKM_Student11-Sep-09 6:44
UKM_Student11-Sep-09 6: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.