Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // main.c
- // inverser
- //
- // Created by MacBook Pro on 11/01/2016.
- // Copyright © 2016 MacBook Pro. All rights reserved.
- //
- #include <stdio.h>
- #include "stdlib.h"
- int main(int argc, const char * argv[]) {
- int n,ni;
- printf("Donner un nombre:\n-> ");
- scanf("%d",&n);
- ni = 0;
- while (n != 0) {
- ni = ni*10 + n %10;
- n /=10;
- }
- printf("-> %d\n",ni);
- system(pause);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement