Click here to Skip to main content
13,348,874 members (78,345 online)

C / C++ / MFC

 
AnswerRe: To arrange n numbers in descending order ? Pin
Richard MacCutchan13-Oct-17 23:44
protectorRichard MacCutchan13-Oct-17 23:44 
AnswerRe: To arrange n numbers in descending order ? Pin
«_Superman_»15-Oct-17 19:02
professional«_Superman_»15-Oct-17 19:02 
AnswerRe: To arrange n numbers in descending order ? Pin
CPallini16-Oct-17 4:21
mvpCPallini16-Oct-17 4:21 
QuestionTo find biggest of n numbers ? Pin
Tarun Jha13-Oct-17 6:44
memberTarun Jha13-Oct-17 6:44 
AnswerRe: To find biggest of n numbers ? Pin
jschell13-Oct-17 6:56
memberjschell13-Oct-17 6:56 
GeneralRe: To find biggest of n numbers ? Pin
Tarun Jha13-Oct-17 7:02
memberTarun Jha13-Oct-17 7:02 
GeneralRe: To find biggest of n numbers ? Pin
jschell15-Oct-17 8:11
memberjschell15-Oct-17 8:11 
AnswerRe: To find biggest of n numbers ? Pin
Richard MacCutchan13-Oct-17 7:16
protectorRichard MacCutchan13-Oct-17 7:16 
Most of that code is redundant, all you need is something like:
int num = -1, largest = 0;


do{
    printf("Enter an integer, 0 to exit:\n");
    
    scanf("%d", &num);
    if (num > largest)
        largest = num;
}while(num != 0);
printf("%d is the biggest number", largest);

GeneralRe: To find biggest of n numbers ? Pin
Tarun Jha13-Oct-17 7:22
memberTarun Jha13-Oct-17 7:22 
GeneralRe: To find biggest of n numbers ? Pin
jeron113-Oct-17 7:34
memberjeron113-Oct-17 7:34 
GeneralRe: To find biggest of n numbers ? Pin
Richard MacCutchan13-Oct-17 7:51
protectorRichard MacCutchan13-Oct-17 7:51 
GeneralRe: To find biggest of n numbers ? Pin
Tarun Jha13-Oct-17 8:14
memberTarun Jha13-Oct-17 8:14 
GeneralRe: To find biggest of n numbers ? Pin
David Crow13-Oct-17 17:10
memberDavid Crow13-Oct-17 17:10 
GeneralRe: To find biggest of n numbers ? Pin
Richard MacCutchan13-Oct-17 23:33
protectorRichard MacCutchan13-Oct-17 23:33 
AnswerRe: To find biggest of n numbers ? Pin
leon de boer13-Oct-17 7:50
memberleon de boer13-Oct-17 7:50 
Questionwhile error ? Pin
bluatigro12-Oct-17 1:23
memberbluatigro12-Oct-17 1:23 
QuestionRe: while error ? Pin
David Crow12-Oct-17 3:35
memberDavid Crow12-Oct-17 3:35 
AnswerRe: while error ? Pin
Manish K. Agarwal12-Oct-17 5:22
memberManish K. Agarwal12-Oct-17 5:22 
AnswerRe: while error ? Pin
Manish K. Agarwal12-Oct-17 5:26
memberManish K. Agarwal12-Oct-17 5:26 
QuestionWhere is GetTickCount64()? Pin
inlandchris11-Oct-17 12:10
memberinlandchris11-Oct-17 12:10 
AnswerRe: Where is GetTickCount64()? Pin
Randor 11-Oct-17 12:52
professional Randor 11-Oct-17 12:52 
GeneralRe: Where is GetTickCount64()? Pin
inlandchris11-Oct-17 18:24
memberinlandchris11-Oct-17 18:24 
GeneralRe: Where is GetTickCount64()? Pin
Randor 11-Oct-17 20:26
professional Randor 11-Oct-17 20:26 
AnswerRe: Where is GetTickCount64()? Pin
leon de boer11-Oct-17 16:29
memberleon de boer11-Oct-17 16:29 
GeneralRe: Where is GetTickCount64()? Pin
inlandchris11-Oct-17 18:27
memberinlandchris11-Oct-17 18:27 

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.


Advertise | Privacy |
Web04 | 2.8.180111.1 | Last Updated 18 Jan 2018
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid