Skip to content

Instantly share code, notes, and snippets.

@enzerr

enzerr/Jogo.cpp Secret

Created January 14, 2023 11:52
Show Gist options
  • Save enzerr/daf00224e63d38d71fb21b27e0fcce7e to your computer and use it in GitHub Desktop.
Save enzerr/daf00224e63d38d71fb21b27e0fcce7e to your computer and use it in GitHub Desktop.
#include<bits/stdc++.h>
using namespace std;
int main(){
int x; cin >> x;
int t;
while(cin>>t){ // "cin>>t" retorna falso e o while se encerra se não há mais nada para ler
if(x>t) cout << "maior\n";
if(x<t) cout << "menor\n";
if(x==t) cout << "correto\n";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment