2011-09-05 12:14:12 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
2011-09-05 13:10:19 +00:00
|
|
|
int distance = 0xaf + 0747;
|
|
|
|
float power = 2.345f + 'Z' + 'A' + 'P';
|
2011-09-05 12:14:12 +00:00
|
|
|
double super_power = 56789.4532f;
|
|
|
|
char initial = 'A';
|
|
|
|
char first_name[] = "Zed";
|
2011-09-05 13:10:19 +00:00
|
|
|
char last_name[] = {'S', 'h', 'a', 'w', '\0'};
|
2011-09-05 12:14:12 +00:00
|
|
|
|
2011-09-05 13:10:19 +00:00
|
|
|
printf("You are %08d miles away.\n", distance);
|
|
|
|
printf("You have %.2f levels of power.\n", power);
|
|
|
|
printf("You have %.3f awesome super powers.\n", super_power);
|
2011-09-05 12:14:12 +00:00
|
|
|
printf("I have an initial %c.\n", initial);
|
|
|
|
printf("I have a first name %s.\n", first_name);
|
|
|
|
printf("I have a last name %s.\n", last_name);
|
|
|
|
printf("My whole name is %s %c. %s.\n",
|
|
|
|
first_name, initial, last_name);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|