Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int MaiorNumero(int a,int b);
- {
- int maior;
- if(a>b)
- {
- maior = a;
- }
- else
- {
- maior = b;
- }
- return maior;
- }
- int main()
- {
- int a,b,i,resultado;
- i=0;
- do
- {
- printf("Digite dois valores: ");
- scanf("%d%d", &a, &b);
- if(a=b)
- {
- printf("Eles são iguais!");
- }
- else
- {
- resultado = MaiorNumero(a,b);
- printf("O maior valor eh: %d", resultado);
- i++;
- }
- } while(i<=5);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement