Skip to main content

URI ONLINE JUDGE - 1041

Solution of 1041 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;
    cin >> a >> b;
    if(a==0.0&&b==0.0)cout << "Origem" << endl;
    if(a>0&&b>0) cout << "Q1" << endl;
    if(a<0&&b>0) cout << "Q2" << endl;
    if(a<0&&b<0) cout << "Q3" << endl;
    if(a>0&&b<0) cout << "Q4" << endl;
    if(a>0&&b==0)cout << ("Eixo X") << endl;
    if(a<0&&b==0)cout << ("Eixo X") << endl;
    if(b>0&&a==0)cout << ("Eixo Y") << endl;
    if(b<0&&a==0)cout << ("Eixo Y") << 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

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.

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)             {       ...

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; }