1.c++ program to find the total marks and average of three subjects



 // C++ program to find the total marks and average of three subjects 

INPUT:

#include<iostream> 

using namespace std;

 int main() 

        int a,b,c,sum,avg; 

        cout<<"\n Enter Mark 1:";

        cin>>a; 

        cout<<"\n Enter Mark 2:"; 

        cin>>b; 

        cout<<"\n Enter Mark 3:";

        cin>>c; sum = a + b + c;

        avg = sum / 3; 

        cout<<"\n The sum = "<<sum;

        cout<<"\n The average = "<<avg<<"%";

}


OUTPUT:



Comments