Crate a simple class with attributes name,rollno,total,average. Define a method to get input from the user for the following attributes name,rollno,total.Define another method to calculate the average & print all those attributes as output Test Case 1 Input (stdin) saravanan 101 200 Expected Output saravanan 101 200 40 Test Case 2 Input (stdin) Bala 102 500 Expected Output Bala 102 500 100
#include <iostream>
using namespace std;
int main()
{
char n[50];
int a,b;
cin>>n>>a>>b;
cout<<n<<" "<<a<<" "<<b<<" "<<b/5;
return 0;
}