working version of ex6.c

This commit is contained in:
Dan Buch 2011-09-05 08:14:12 -04:00
parent 6a0e1ba5e6
commit 997b3784c7
2 changed files with 23 additions and 0 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@ ex1
ex3 ex3
ex4 ex4
ex5 ex5
ex6

22
ex6.c Normal file
View File

@ -0,0 +1,22 @@
#include <stdio.h>
int main(int argc, char *argv[])
{
int distance = 100;
float power = 2.345f;
double super_power = 56789.4532f;
char initial = 'A';
char first_name[] = "Zed";
char last_name[] = "Shaw";
printf("You are %d miles away.\n", distance);
printf("You have %f levels of power.\n", power);
printf("You have %f awesome super powers.\n", super_power);
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;
}