Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
project
#include <iostream> #include <string> #include <string.h> using namespace std; double grAv (double sum ,int i ){ return sum/i; } int main (){ char x; int i,j , ch; cout<<" >>>>> Student System <<<<< "<<endl<<endl; cout<<"Enter number of students : "; cin>>i; cout<<"Enter number of courses : "; cin>>j; string arn[i]; int arc[i][j]; double arg [i] ; do { cout<<">>>>> Please choose a service : "<<endl; cout<<">>>>> A- Add a student’s grade in a course."<<endl; cout<<">>>>> B- Print grades for a certain course and the average of students’ grades in this course. "<<endl; cout<<">>>>> C- Print the grade letter for all courses of a certain student."<<endl; cout<<">>>>> D- Update the grade of a student in a certain grade."<<endl; cout<<">>>>> E- Delete a certain mark for certain student."<<endl; cout<<">>>>> F- Exit."<<endl; cin>>x; switch (x){ case 'A' : case 'a' : {cout<<"choose number of coruses you want to enter grades in :"; cin>>ch; for (int colm=0;colm<ch;colm++) { cout<<"Course #"<<colm+1<<":"; for(int row=0;row<i;row++){ cout<<"enter your grade for student "<<row+1<<":"<<endl; cin>>arc[row][colm]; cout<<endl;}} cout<<endl<<endl<<endl;} break; case 'B' : case 'b' : { ch=0; cout<<"choose number of the course to print the grade and avg :"; cin>>ch; cout<<"the grades for #"<<ch<<" course is :"<<endl; double sum=0.0; int colm=ch-1; for (int row=0;row<i;row++){ cout<<arc[row][colm]; sum+=arc[row][colm]; cout<<endl;} cout<<"The average for course #"<<ch<<" is : "<< grAv (sum ,i); cout<<endl<<endl<<endl;} break; case 'C' : case 'c' : { cout<<"enter your name : "; cin>> } cout<<"cccccccccccccccccccccccc"<<endl<<endl<<endl; break; case 'D' : case 'd' : cout<<"ddddddddddddddddd"<<endl<<endl<<endl; break; case'E': case 'e': cout<<"eeeeeeeeeeeeeeeee"<<endl<<endl<<endl; case 'F': case 'f': cout<<"fffffffffffffffffff"<<endl<<endl<<endl; } } while (x!='f' && x!='F'); }
run
|
edit
|
history
|
help
0
base base
Zadanie Kolokwium_2011_z4
C++ User Input #1
GRAPH DFS & BFS
mine
perimetar na triagolnik
Tree
odws
-Wall -std=c++14 -O0 -o a.out source_file.cpp
Array Subset of another array