No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
#include <iostream> #include <iomanip> #include <fstream> const int NUM_SURVEY=3; using namespace std; struct Survey { int IdentificationNumber; double annualIncome; int numberOfHouseMember; }; void getData(); void calculateAverage(); void findPoverty(); void printReport(); int main() { getData(); calculateAverage(); findPoverty(); printReport(); system("pause"); return 0; } void getData() { Survey Households[NUM_SURVEY]; int i; cout<<"------------Enter " … |
|
#include<iostream> using namespace std; struct Student_Record{ int id_num; int assignment; int quiz; int test; char grade; }; void get_data(Student_Record &p); int calc_mark(Student_Record p); Student_Record read_data(); void print_all(const struct Student_Record p{}); int main() { Student_Record amir,naim, amirNaim[2]; int amirtotal_mark, naimtotal_mark; get_data (amir); amirtotal_mark=calc_mark(amir); if (amirtotal_mark>=60) amir.grade ='p'; else amir.grade='F'; naim= read_data(); … |