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

UVA-11764 Solution

Solution of 11764 UVA number ! please do not copy it rather watch it for learning purpose :) Here is the code :- #include <iostream> #include <bits/stdc++.h> using namespace std;    int main(){        //mechaboo     int testCases;     cin >> testCases;     for (int i=0;i<testCases;i++)     {         int len,maxx=0,minn=0;         cin >> len;         int  arrJumps[len] ;         for(int j=0;j<len;j++)         {             cin >> arrJumps[j];             if(j!=0)             {       ...

11942 Lumberjack Sequencing - Solution

Solution of 11942  Lumberjack Sequencing- UVA please do not copy it rather watch it for learning purpose :) Here is the code :-  #include <iostream> #include <bits/stdc++.h> using namespace std; //MECHABOO  bool smallToBig(int arr[]);  bool bigToSmall(int arr[]);    int main(){     int test;     cin >> test;     for(int i=0;i<test;i++)     {         int arr[10];         bool nat;         for(int j=0;j<10;j++)         {             cin >> arr[j];         }         if(arr[0]>arr[1]||arr[1]>arr[2])         {           ...

Skeleton Of C++

Today we will see the body structure of c++ below is given the structure:- #include <iostream> #include <bits/stdc++.h> using namespace std; int main () {     //your codes goes here     return 0; }   You will start writing your code from main function.