-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathaddcourse.cpp
More file actions
32 lines (28 loc) · 739 Bytes
/
addcourse.cpp
File metadata and controls
32 lines (28 loc) · 739 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include<iostream>
using namespace std;
void AddCourse(string codelist[],int creditlist[],int semesterlist[],string namelist[],string code,int credit,int semester,string name)
{
if(isValidCourseCode(code))
if(isValidCreditHours(credit))
if(isValidSemester(semester))
if(isValidCourseName(name))
{
codelist[counter]=code;
creditlist[counter]=credit;
semesterlist[counter]=semester;
namelist[counter]=name;
counter++;
}
else
cout<<"INVALID COURSENAME"<<endl;
else
cout<<"INVAID SEMESTER "<<endl;
else
cout<<"INVALID CREDIT HOUR"<<endl;
else
cout<<"INVALID COURSE CODE"<<endl;
}
int main()
{
return 0;
}