How To Solve Tasks 4.3 Before We Begin To Work On The Algorithm For Finding The Maximum We Need

C ++ Program

#include <iostream>
using namespace std;

int main()
{
   int max,n,i;
   float A[100];
   cout <<"Enter Number Data : ";cin>>n;
   for(i=0;i<n;i++){
cout << "enter the number to "<< i+1 << " : ";
cin >> A[i];}
   max = A[0];
    for (i=1;i<n;i++){
       if (max <  A [i])
            max = A[i];
    }
    cout <<"The biggest value is : "<<max<<endl;
    return 0;
}



Logic Using Raptor


Share this:

ABOUT THE AUTHOR

Ceyron Louis

A web designer from India. And then you write some more information about yourself like this to fill out the space that is left.

0 komentar:

Posting Komentar