int grades()
{
vector<int> teachernumber;
vector<int> studentnumber;
vector<int> classnumber;
string schoolname="";
cout << "This part of the program will average your grades." << endl;
cout << "Please select the thing you would like to fill out." << endl;
cout << "[1]Schoolname" << endl;
cout << "[2]Teacher Info" << endl;
cout << "[3]Classes" << endl;
cout << "[4]Students" << endl;
cout << "[5]Grades" << endl;
int menu;
cin >> menu;
while (menu != 1 && menu != 2 && menu != 3 && menu != 4 && menu != 5)
{
cout << "Invalid input" << endl;
cin >> menu;
}
switch (menu)
{
case 1:
cout << "Fill out the school name." << endl;
cin >> schoolname;
break;
case 2:
cout << "How many teachers are there?" << endl;
cout << "What is the name of teacher #" << "?" << endl;
break;
case 3:
cout << "How many classes do you have "<< "?" << endl;
cout << "What is the name of class #" << "?" << endl;
break;
case 4:
cout << "How many students are in " << "?" << endl;
cout << "What is the name of student #" << "?" << endl;
break;
case 5:
cout << "What are the grades?" << endl;
}
return 2182;
}
the program i know wont actually do anything useful but i want to get it so itll at least call it right
#include "stdafx.h"
#include <iostream>
#include <string>
#include <vector>
usingnamespace std;
string note="";
int grades();
int calculator();
int notes();
int menu= 0;
int main()
{
system("color C8");
while (menu == 1||menu == 2||menu == 3||menu == 0)
{
cout << "Welcome to TeacherHelp" << endl;
cout << "This Program will do many things to help teachers." << endl;
cout << "Write the number of your choice." << endl;
cout << "[1]Calculator" << endl;
cout << "[2]Average Grades" << endl;
cout << "[3]Note" << endl;
cout << note << endl;
cin >> menu;
std::cin.ignore();
switch(menu)
{
case 1:
int calculator();
break;
case 2:
int grades();
break;
case 3:
notes();
break;
default:
cout << "Invalid Input" << endl;
cin >> menu;
}
}
return 2182;
}
int notes()
{
cout << "Create a note" << endl;
std::getline(std::cin, note);
return 2182;
}
int grades()
{
string schoolname="";
cout << "This part of the program will average your grades." << endl;
cout << "Please select the thing you would like to fill out." << endl;
cout << "[1]Schoolname" << endl;
cout << "[2]Teacher Info" << endl;
cout << "[3]Classes" << endl;
cout << "[4]Students" << endl;
cout << "[5]Grades" << endl;
int menu;
cin >> menu;
switch (menu)
{
case 1:
cout << "Fill out the school name." << endl;
cin >> schoolname;
break;
case 2:
cout << "How many teachers are there?" << endl;
cout << "What is the name of teacher #" << "?" << endl;
break;
case 3:
cout << "How many classes do you have "<< "?" << endl;
cout << "What is the name of class #" << "?" << endl;
break;
case 4:
cout << "How many students are in " << "?" << endl;
cout << "What is the name of student #" << "?" << endl;
break;
case 5:
cout << "What are the grades?" << endl;
break;
default:
cout << "Invalid Input" << endl;
cin >> menu;
break;
}
return 2182;
}