Commit 4d2b408a authored by elijah vasquez's avatar elijah vasquez 🦍

commit

parents
File added
#include <stdio.h>
int main(void) {
printf("Hello World\n");
return 0;
}
\ No newline at end of file
File added
#include <stdio.h>
int main(void) {
/*making floats*/
float br = 1.20;
float mi = 0.95;
float ch = 5.00;
float bu = 2.10;
/*header*/
printf("Receipt\n");
printf("-------\n");
/*list*/
printf("Bread\t£%.2f\n", br);
printf("Milk\t£%.2f\n", mi);
printf("Cheese\t£%.2f\n", ch);
printf("Butter\t£%.2f\n", bu);
/*list end*/
printf("\t\t-----\n");
/*sum total creation and printing of total*/
float sum = br + mi + ch + bu;
printf("Total\t£%.2f", sum);
return 0;
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment