Advertisement
Joao_Joao

Questão 46 Lista de Exercícios IFPB

May 11th, 2022
1,483
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2.  
  3. void main() {
  4.   int num;
  5.   printf("Digite um numero: ");
  6.   scanf("%d", &num);
  7.   int a = num % 10;
  8.   int b = num % 100 / 10;
  9.   int c = num % 1000 / 100;
  10.   int rev = (a * 100) + (b * 10) + c;
  11.   printf("O reverso do numero eh: %d\n", rev);
  12. }
  13.  
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement