Professional Documents
Culture Documents
Institutional Training: June-July, 2021
Institutional Training: June-July, 2021
CSE
Institutional Training
June-July, 2021
Department of AIT-CSE
SOLUTION:
#include<iostream>
using namespace std;
Page 2
Department of AIT-
CSE
int marks;
cout<<" Enter student's marks out of 100: ";
cin>>marks;
cout<<grades(marks);
return 0;
}
OUTPUT:
Page 3
Department of AIT-
CSE
QUESTION-2:
Write a program to print the circumference and area of a circle of radius entered by user by defining
your own function.
SOLUTION:
#include<iostream>
using namespace std;
OUTPUT:
Page 4
Department of AIT-
CSE
QUESTION-3:
Write a program that calculates the total point earned by a football team over a series of games and
calculate the average of team. It allows the user to enter the series of game points, then -1 to signal the
end of the list.
SOLUTION:
#include<iostream>
using namespace std;
main()
{
float average;
int score;
int total_points=0;
int total_matches=0;
cout<<"Enter the score:";
cin>>score; while(score!=-1)
{
total_matches++;
total_points+=score;
cout<<"Enter the score:";
cin>>score;
}
average=(float(total_points)/float(total_matches));
cout<<"Average points in every match of your team in this series is
"<<average<<endl;
cout<<"Total points earned by your team in this series is "<<total_points<<" in
"<<total_matches<<" matches"<<endl;
return 0;
}
Page 5
Department of AIT-
CSE
OUTPUT:
Page 6