-
-
Save anonymous/b78d22d9ffe8a2d33924 to your computer and use it in GitHub Desktop.
Avaliação 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main(int argc, char const *argv[]) { | |
int a, b, temp; | |
scanf("%d", &a); | |
scanf("%d", &b); | |
temp = a; | |
a = b; | |
b = temp; | |
printf("\n Agora a=%d e b=%d\n", a, b); | |
return 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main(int argc, char const *argv[]) { | |
int a, x, y; | |
float b; | |
char c; | |
a=2; | |
b=3.67; | |
c='A'; | |
printf("a=%d b=%f c=%c\n", a,b, c); | |
a=x=y=6; | |
printf("a=%d x=%d y=%d ", a, x, y); | |
return 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main(int argc, char const *argv[]) { | |
int a; | |
float b; | |
b=9/2; | |
a=9/2; | |
printf("a=%d b=%.2f \n", a, b); | |
a=9.0/2; | |
b=9.0/2; | |
printf("a=%d b=%.2f \n", a, b); | |
a=10; | |
a=a+1; | |
a++; | |
printf("a=%d\n", a); | |
a=20; | |
a=a-1; | |
a--; | |
printf("a=%d\n", a); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment