format code and sign with gpg
This commit is contained in:
parent
1461008519
commit
769d2273d1
|
@ -1,7 +1,6 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
int main(void)
|
int main(void) {
|
||||||
{
|
|
||||||
// initialization
|
// initialization
|
||||||
char sex;
|
char sex;
|
||||||
int age;
|
int age;
|
||||||
|
@ -11,6 +10,7 @@ int main(void)
|
||||||
scanf("%c %i %f", &sex, &age, &height);
|
scanf("%c %i %f", &sex, &age, &height);
|
||||||
|
|
||||||
// print answer to stdout
|
// print answer to stdout
|
||||||
printf("The sex is %c, the age is %i, and the height is %f.", sex, age, height);
|
printf("The sex is %c, the age is %i, and the height is %f.", sex, age,
|
||||||
|
height);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
int main(void)
|
int main(void) {
|
||||||
{
|
|
||||||
// initialize variables
|
// initialize variables
|
||||||
char a;
|
char a;
|
||||||
short b;
|
short b;
|
||||||
|
@ -19,7 +18,8 @@ int main(void)
|
||||||
printf("The 'short' variable is %hd, it takes %ld bytes.\n", b, sizeof(b));
|
printf("The 'short' variable is %hd, it takes %ld bytes.\n", b, sizeof(b));
|
||||||
printf("The 'int' variable is %i, it takes %ld bytes.\n", c, sizeof(c));
|
printf("The 'int' variable is %i, it takes %ld bytes.\n", c, sizeof(c));
|
||||||
printf("The 'long' variable is %ld, it takes %ld bytes.\n", d, sizeof(d));
|
printf("The 'long' variable is %ld, it takes %ld bytes.\n", d, sizeof(d));
|
||||||
printf("The 'long long' variable is %lld, it takes %ld bytes.\n", e, sizeof(e));
|
printf("The 'long long' variable is %lld, it takes %ld bytes.\n", e,
|
||||||
|
sizeof(e));
|
||||||
printf("The 'float' variable is %f, it takes %ld bytes.\n", f, sizeof(f));
|
printf("The 'float' variable is %f, it takes %ld bytes.\n", f, sizeof(f));
|
||||||
printf("The 'double' variable is %lf, it takes %ld bytes.\n", g, sizeof(g));
|
printf("The 'double' variable is %lf, it takes %ld bytes.\n", g, sizeof(g));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue