Skip to main content

URI ONLINE JUDGE - 1040

Solution of 1040 number !
please do not copy it rather watch it for learning purpose :)

#include <iostream>
#include <bits/stdc++.h>
using namespace std;
int main ()
{
    double a,b,c,d;
    cin >> a >> b >> c >> d;
    a=(a*2+b*3+4*c+1*d)/10.0;
    if(a>=5.00&&a<7.0)
    {
            cout << "Media: "<<fixed <<setprecision(1)<<a<<endl<<"Aluno em exame."<<endl;
            double e;
            cin >> e;
            cout << "Nota do exame: "<<fixed <<setprecision(1)<<e<<endl;
            a=(a+e)/2.0;
            if(a>=5.00)
            {
                cout <<"Aluno aprovado."<<endl<<"Media final: "<<fixed <<setprecision(1)<<a<<endl;
            }
            else
            {
                cout <<"Aluno reprovado."<<endl<<"Media final: "<<fixed <<setprecision(1)<<a<<endl;
            }
    }
    else
    {
        if(a<5.00)
        {
            cout << "Media: "<<fixed <<setprecision(1)<<a<<endl<<"Aluno reprovado."<<endl;
        }
        else    cout << "Media: "<<fixed <<setprecision(1)<<a<<endl<<"Aluno aprovado."<<endl;
    }
    return 0;
}





If you do not understand please leave a message here.
or mail us mechaboo786@gmail.com
or you can leave a message at fb . Link :- https://www.facebook.com/mechaboo/

Comments

Popular posts from this blog

Key to writing Code_Flowcahrt (beginner)

Hello everyone! welcome to our site. In this section we will give you a little idea about flowchart. I am considering you are a Computer Science student, If you are not , nothing to worry about. we will keep it simple and easy. Flow chart is "A  diagram of the sequence of movements or actions of people or things involved in a complex system or activity"(collected from Google) in short  its a construction map for code or anything, it's like sequence work. To give you an example its kind of like this : So,lets start with the basics there are few things to remember before drawing a flow chart: 1.To a flowchart you have to use some stander signs . 2.By giving arrow you have to show the flow. 3.You should not write flowchart in a particular programming language. That's the things to remember while writing a flowchart. Now,here are some signs that are used in flowchart and there meaning:  There are 3 types of Flowchart : 1.Simple ...

C++ input and Output

In this post we will teach you how to take input from the user and how to print. type :- int a; cin >>  a; thats how you can input a number in a variable and for output or print :- You have to type:- int a=10; cout <<a ; lets see a code  below :- #include <iostream> #include <bits/stdc++.h> using namespace std; int main () {     int a;     cin >> a;     cout << a;     return 0; }

10424 - Love Calculator UVA Solution

10424 - Love Calculator UVA Solution please do not copy it rather watch it for learning purpose :) Here is the code :-  #include <iostream> #include <bits/stdc++.h> #include <string> using namespace std; int getval(string nam); int reducingVal(int val);    int main(){        //MechaBoo     string name1,name2;     while(getline(cin,name1))     {         getline(cin,name2);         int par1= getval(name1);         int par2=getval(name2);         par1=reducingVal(par1);         par2=reducingVal(par2);               double x= par1*1.00;         double y=par2*1.00;           ...