Skip to content

Instantly share code, notes, and snippets.

/5.c

Created Sep 7, 2015
Embed
What would you like to do?
Avaliação 1
#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;
}
#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;
}
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