Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Assignment 3
//gcc 5.4.0 #include <stdio.h> int main(void) { int yogurtPrice=4; int yogurtQ=1; int applePrice=5; int appleQ=1; int beerPrice=10; int beerQ=1; int sodaPrice=7; int sodaQ=1; char name[40]; int cardNumber; int expirationMonth; int expirationYear; float totalPrice; int quantity; scanf("%d", &cardNumber); scanf("%d/%d", &expirationMonth, &expirationYear); printf("The expiration date is %d/%d\n",expirationMonth, expirationYear); totalPrice=yogurtPrice+applePrice+beerPrice+sodaPrice; totalPrice=totalPrice*.05; quantity=yogurtQ+appleQ+beerQ+sodaQ; printf("The price of yogurt is %d\n", yogurtPrice); scanf("%s", name); printf("Thank you %s\n", name); return 0; }
run
|
edit
|
history
|
help
0
lab9tho
Arrays
Project 3 Part 1 v1.5
Bool datatype Operation for GCC
4
json string formatter
C_141211_OrdenarArrayConFunciones
numerodevecesquerepitedigitoennumero
table of 123
fgets and basic string manipulation