Computer Science, asked by shazaafrin, 3 months ago

write a programme in c++ to input marks of three subjects to calculate and print sum and average along with flow chart​

Answers

Answered by anindyaadhikari13
5

Solution:

The given códe is written in C++.

#include <iostream>

using namespace std;

int main() {

float num1,num2,num3,Sum,Average;

cout<<"Enter marks in first subject: ";

cin>>num1;

cout<<"Enter marks in second subject: ";

cin>>num2;

cout<<"Enter marks in third subject: ";

cin>>num3;

Sum=num1+num2+num3;

cout<<"Sum: "<<Sum<<endl;

Average=Sum/3.0;

cout<<"Average marks: "<<Average;

return 0;

}

For flowchart and output, refer to the attachment.

•••♪

Attachments:
Similar questions