Pages

Friday, March 21, 2025

calculate sum of total of 3 subjects in C++

 #include<iostream>

#include<iomanip>
using namespace std;

int main() {
    int science;
    int english;
    int math;

    cout<<"enter science marks: ";
    cin>>science;

    cout<<"enter english marks: ";
    cin>>english;

    cout<<"enter math marks: ";
    cin>>math;

    int avg = (science+science+math)/3;

    cout<<"avg = "<<avg<<endl;

    return 0;

}

No comments:

Post a Comment

how to become red on codeforces by Errichto Algorithms | explained simply in a blog

 Yes. I found an available transcript of the video and summarized it simply. The video is “How To Become Red Coder? (codeforces.com)” by Err...