Portfolio Title





 

 

Student Portfolio >> Index >> Coding >> Exercise 8

#include <iostream.h>
           int main()
           { int doubles[10];
           int value;
           float total=0, max=-5000, amount;
           for (value=0;value<10;value++)
           doubles[value]=0;           
for(value=0;value<10;value++)
             { cout << "Enter the value for #"<< value+1<<": ";
             cin>>amount;
             doubles[value]=amount;
             if (max<amount)
             max=amount;
             else max = max;
             }
for(value=0;value<10;value++)
             { cout <<"Value #"<<value+1<<" = "<<doubles[value] <<endl;
             }
             cout<< "\nHighest value entered is "<<max <<endl;
             return 0;
         }

<< Back                                                                                                                                                                                        Forward >> 

Coding | Website Scripting | Visual Design | Instructional Design | Website Design | Website Design Tools

 

Copyright 2005 Kerstin Kegel