C++ Program to find average marks of five subjects of a student

 Code:



#include<iostream> 

using namespace std; 

int main(){ 

int a, b, c, d, e; 

int total_marks; 

int average_marks; 

cout << "Code by Code Champ"<<endl;

cout << "Enter marks of five subjects "; 

cin >> a >> b >> c >> d >> e; 

total_marks = a + b + c + d + e; 

average_marks = total_marks/5; 

cout << "--------------------------------"<<endl; 

cout << "Total marks of student: " << total_marks << endl << "Average_marks of students: " << average_marks; 

return 0; 

Result/Output:


For more follow on Instragram: Code Champ

Draw Shin Chan using Python Turtle: https://youtu.be/JqS5NJV2chk
Draw Doremon using Turtle in python : https://youtu.be/mfPfSERU2K0
Print name using Python Turtle: https://youtu.be/5XcSBJqQMIc
Indian Flag using Python Turtle: https://youtu.be/XSulTcyWAoE
Amazing Design/ pattern using Python Turtle: https://youtu.be/fIYzTIjJdT4 
Amazing 2Design/ pattern using Python Turtle:  https://youtu.be/5gX09uVdjlo

Difference  between C++ and Java: https://youtu.be/oSLL27bIXKQ

Types of application in java: https://www.instagram.com/p/CUIBrSmv6LM/

No comments:

Powered by Blogger.