Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int rodaUmaVez(int *a, int *b, int *c);
- int rodaUmaVez(int *a, int *b, int *c) {
- int aux, aux2;
- aux = *a;
- aux2 = *b;
- *a = *c;
- *b = aux;
- *c = aux2;
- }
- int main(void) {
- int x, y, z;
- printf ("Entre com 3 numeros: ");
- scanf ("%d %d %d", &x, &y, &z);
- rodaUmaVez(&x, &y, &z);
- printf ("\n\nRodando os valores uma vez: %d, %d, %d", x,y,z);
- printf ("\n\n\n");
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement