Answer:
Following are the code to the given question:
#include<iostream>//defining header file
using namespace std;
int main()//defining main method
{
float clspat,test,asst,exam,practice,total,average;//defining floating variable
char name[100];//defining char variable to input value
cout<<"Enter Name of Student: ";//print message
cin>>name; //input value
cout<<"Enter scores in following scoring items between 0 and 100:"<<"\n";//print message
cout<<"Enter class participation score: ";//print message
cin>>clspat;//input value
cout<<"Enter test score: ";//print message
cin>>test;//input value
cout<<"Enter assignment score: ";//print message
cin>>asst;//input value
cout<<"Enter exam score: ";//print message
cin>>exam;//input value
cout<<"Enter practice score: ";//print message
cin>>practice;//input value
total=clspat+test+asst+exam+practice;//calculating total value
average=total/5;//calculating average value
cout<<endl<<"SCORE CARD OF "<<name<<"\n"<<"-----------------------"<<"\n";//print value with message
cout<<"Total score: "<<total<<"\n";//print message with value
cout<<"Average score: "<<average; //print message with value
}
Output:
please find the attached file.
Explanation:
In this code, the floating-point variable is declared, which is used for input value from the user-end and after input the floating-point value it uses the "total, average" variable to calculate its respective values and store its value with init, after storing the value into the variable it uses the print method to print its values.