Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Assignment 3 Final
//gcc 5.4.0 #include <stdio.h> int main(void) { float yogurtPrice=4; int yogurtQ=1; float applePrice=5; int appleQ=1; float beerPrice=10; int beerQ=1; float sodaPrice=7; int sodaQ=1; char name[40]; int cardNumber; int expirationMonth; int expirationYear; float totalPrice; int quantity; scanf("%d %d %d %d", &yogurtQ, &appleQ, &beerQ, &sodaQ); scanf("%d", &cardNumber); scanf("%d %d", &expirationMonth, &expirationYear); printf("The expiration date is %d/%d\n",expirationMonth, expirationYear); yogurtQ--; totalPrice=(yogurtPrice*yogurtQ)+(applePrice*appleQ)+(beerPrice*beerQ)+(sodaPrice*sodaQ); totalPrice=totalPrice*1.05; quantity=yogurtQ+appleQ+beerQ+sodaQ; printf("The total price %.02f\n", totalPrice); scanf("%s", name); printf("Thank you %s\n", name); return 0; }
run
|
edit
|
history
|
help
0
Project 5 v.08
upper case letter.c
recurs fibo1
Poiter minus
150114_ArrayOrdenado
Sorting Character array using Qsort
Nearly working
C programming final grade
WAP in C to print the reverse of a string
multi dimension sum