█████████ ████ ███░░░░░███ ░░███ ███ ░░░ ██████ ███████ ██████ ██████ ░███ ███░░███ ███░░███ ███░░███ ███░░███ ░███ ░███ ░███░███ ░███ ░███████ ░███ ░███ ░░███ ███░███ ░███░███ ░███ ░███░░░ ░███ ░███ ░░█████████ ░░██████ ░░████████░░██████ ░░██████ ░░░░░░░░░ ░░░░░░ ░░░░░░░░ ░░░░░░ ░░░░░░

Envío 1040

Problema 0x60 - ¿Mayor, menor o igual?

  • Autor: nicolaspa
  • Fecha: 2020-10-09 00:05:52 UTC (Hace alrededor de 1 año)
Caso # Resultado Tiempo Memoria
#1
Correcto
                      main.cpp:13:9: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
    if(a=b){cout << "=";}
       ~^~
main.cpp:13:9: note: place parentheses around the assignment to silence this warning
    if(a=b){cout << "=";}
        ^
       (  )
main.cpp:13:9: note: use '==' to turn this assignment into an equality comparison
    if(a=b){cout << "=";}
        ^
        ==
1 warning generated.

                    
0.005 s 2 KBi
#2
Correcto
                      main.cpp:13:9: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
    if(a=b){cout << "=";}
       ~^~
main.cpp:13:9: note: place parentheses around the assignment to silence this warning
    if(a=b){cout << "=";}
        ^
       (  )
main.cpp:13:9: note: use '==' to turn this assignment into an equality comparison
    if(a=b){cout << "=";}
        ^
        ==
1 warning generated.

                    
0.005 s 1 KBi
#3
Correcto
                      main.cpp:13:9: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
    if(a=b){cout << "=";}
       ~^~
main.cpp:13:9: note: place parentheses around the assignment to silence this warning
    if(a=b){cout << "=";}
        ^
       (  )
main.cpp:13:9: note: use '==' to turn this assignment into an equality comparison
    if(a=b){cout << "=";}
        ^
        ==
1 warning generated.

                    
0.005 s 12 KBi
#4
Correcto
                      main.cpp:13:9: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
    if(a=b){cout << "=";}
       ~^~
main.cpp:13:9: note: place parentheses around the assignment to silence this warning
    if(a=b){cout << "=";}
        ^
       (  )
main.cpp:13:9: note: use '==' to turn this assignment into an equality comparison
    if(a=b){cout << "=";}
        ^
        ==
1 warning generated.

                    
0.005 s 40 KBi
#5
Correcto
                      main.cpp:13:9: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
    if(a=b){cout << "=";}
       ~^~
main.cpp:13:9: note: place parentheses around the assignment to silence this warning
    if(a=b){cout << "=";}
        ^
       (  )
main.cpp:13:9: note: use '==' to turn this assignment into an equality comparison
    if(a=b){cout << "=";}
        ^
        ==
1 warning generated.

                    
0.004 s 1 KBi
#6
Correcto
                      main.cpp:13:9: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
    if(a=b){cout << "=";}
       ~^~
main.cpp:13:9: note: place parentheses around the assignment to silence this warning
    if(a=b){cout << "=";}
        ^
       (  )
main.cpp:13:9: note: use '==' to turn this assignment into an equality comparison
    if(a=b){cout << "=";}
        ^
        ==
1 warning generated.

                    
0.005 s 5 KBi
#7
Correcto
                      main.cpp:13:9: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
    if(a=b){cout << "=";}
       ~^~
main.cpp:13:9: note: place parentheses around the assignment to silence this warning
    if(a=b){cout << "=";}
        ^
       (  )
main.cpp:13:9: note: use '==' to turn this assignment into an equality comparison
    if(a=b){cout << "=";}
        ^
        ==
1 warning generated.

                    
0.005 s 1 KBi
#8
Correcto
                      main.cpp:13:9: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
    if(a=b){cout << "=";}
       ~^~
main.cpp:13:9: note: place parentheses around the assignment to silence this warning
    if(a=b){cout << "=";}
        ^
       (  )
main.cpp:13:9: note: use '==' to turn this assignment into an equality comparison
    if(a=b){cout << "=";}
        ^
        ==
1 warning generated.

                    
0.006 s 3 KBi
#9
Correcto
                      main.cpp:13:9: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
    if(a=b){cout << "=";}
       ~^~
main.cpp:13:9: note: place parentheses around the assignment to silence this warning
    if(a=b){cout << "=";}
        ^
       (  )
main.cpp:13:9: note: use '==' to turn this assignment into an equality comparison
    if(a=b){cout << "=";}
        ^
        ==
1 warning generated.

                    
0.005 s 1 KBi
#10
Correcto
                      main.cpp:13:9: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
    if(a=b){cout << "=";}
       ~^~
main.cpp:13:9: note: place parentheses around the assignment to silence this warning
    if(a=b){cout << "=";}
        ^
       (  )
main.cpp:13:9: note: use '==' to turn this assignment into an equality comparison
    if(a=b){cout << "=";}
        ^
        ==
1 warning generated.

                    
0.005 s 3 KBi
Puntos totales: 100 / 100

Código

#include <iostream>

using namespace std;

int main(){

    int a;
    int b;

    cin >> a >> b;
    if(a>b){cout << ">";}else
    if(a<b){cout << "<";}else
    if(a=b){cout << "=";}

    return 0;
}