0
#include <iostream>
#include <conio.h>
using namespace std;
int main()
{
    int num[5],high=0,high_num=0,low=0,low_num=0,a=0;
    for (int a=0;a<5;a++)
    {
        cout<<"enter number "<<a+1<<":";
        cin>>num[a];
        }
        for
        (a=0;a<5;a++)
        
        
                     if(num[a]<high)
                     {
                                    high=num[a];
                                    high_num=a;
                                   
                                    }
                                    cout<<"highest number is.."<<high_num<<"\n";
                                    cout<<"highest number is.."<<high;
                                   
                                    getch();
                                    return 0;
                                    }

please CORRECT this Code

the problem is..
"PROGRAM THAT CAN ACCEPT 5 INPUTTED INTEGER AND DETERMINE
THE HIGHEST AND lowest INTEGER (USING ARRAY,FOR LOOP, AND IF CONDITION)

thank you!

Edited by Nick Evan: Added [CODE] tags. Split thread.

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by Moschops
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.