Notes
![]() ![]() Notes - notes.io |
using namespace std;
void getScore(int &);
void calcAverage(int,int,int,int,int);
int findLowest(int,int,int,int,int);
int main(){
int s1,s2,s3,s4,s5,score,average,low;
cout << "Enter five scores ";
cin >> s1 >> s2 >> s3 >> s4 >> s5;
getScore(s1);
getScore(s2);
getScore(s3);
getScore(s4);
getScore(s5);
calcAverage(s1,s2,s3,s4,s5);
}
void getScore(int &x){
while(x<1 || x>100){
cout << "Enter score again";
cin >> x;
}
}
int findLowest(int s1,int s2 ,int s3,int s4,int s5){
if(s1<s2 && s1<s3 && s1< s4 && s1<s5){
return s1;
}
else if(s2<s1 && s2<s3 && s2< s4 && s2<s5){
return s2;
}
else if(s3<s1 && s3<s2 && s3< s4 && s3<s5){
return s3;
}
else if(s4<s1 && s4<s3 && s4< s2 && s4<s5){
return s4;
}
else if(s5<s1 && s5<s2 && s5< s3 && s5<s3){
return s5;
}
}
void calcAverage(int s1,int s2,int s3,int s4,int s5){
int av =(s1+s2+s3+s4+s5-findLowest(s1,s2,s3,s4,s5))/4;
cout << "The average is " <<av;
}
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team