3
I am not able to display the values of smaller and larger.
Make an algorithm that reads two numbers and indicates whether they are equal or, if different, shows the largest and smallest in this sequence.
int V1,V2;
printf("Valor 1 :"); scanf("%d",&V1);
printf("Valor 2 :"); scanf("%d",&V2);
if (V1==V2){
printf("O valor é igual \n\n ");
}
else{
printf("O valor é diferente \n\n");
}
if (V1>V2){
printf("O valor maior é %d",V1);
}
if (V1<V2){
printf("O valor menor é %d", V2);
}
return(0);
system("pause");
Last
if
has to show theV1
and notV2
, but I suggest you elaborate the question better with what you wanted to show and what you’re showing at the moment– Isac
Did any of the answers solve your question? Do you think you can accept one of them? Check out the [tour] how to do this, if you haven’t already. You would help the community by identifying what was the best solution for you. You can accept only one of them. But you can vote on any question or answer you find useful on the entire site.
– Maniero