Comp242-hw:fsa - #include #include u...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
// Görkem Aksoy 20070756 #include <iostream> #include <cstdlib> using namespace std; u double compute_average_age (const int ages[], int N); int minimum_gender_age (const int ages[], const char genders[], int N, char gend); i int age[20]; // I create an integer array called age with size 20 char gender[20]; // I create a character array called gender with size 20 2 int N; // student numbers that user is going to read from the user char Gender; // gender of the student that user is going to read from the user int Age; // age of the student that user is going to read from the user int totalAge; // total age of the students to calculate the average age of the students a int main(){ i cout<<"Enter the student number(can be at most 20) > "; // ask user the number of students cin>>N; // read the number of students from the user r while(N < 0 || N > 20){ // it says while the number that user enters is in the wrong interval cout<<"Invalid Input!"; // it gives warning to user cout<<"Enter the student number(can be at most 20)> ";
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/18/2010 for the course COMPUTER E Comp242 taught by Professor I.oyman during the Spring '10 term at Koç University.

Page1 / 3

Comp242-hw:fsa - #include #include u...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online