Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
14th Feb Project
//gcc 5.4.0 #include <stdio.h> int main(void) { //----------------------------------------------------------------------------------- //Part 1-1 Draw Equitorial Triangle printf("----------------------------------------------------------\n Part 1-1\n"); printf(" *\n * *\n * * *\n* * * *\n"); //Part 1-2 Draws Square printf("Part 1-2\n* * * * *\n* * * * *\n* * * * *\n* * * * *\n* * * * *\n"); printf("----------------------------------------------------------\n Part 2\n"); //-------------------------------------------------------------- char CustomerName[100]; double Days; double costperDay; costperDay=30; double costofDays; double Miles; double costperMile; costperMile=.5; double costofMiles; double Gallons; double costperGallon; costperGallon=1.5; double costofGallons; double TotalRentalCost; printf("Customer name:\n Number of days:\n Number of miles:\n Number of gallons:\n------------------------------\n Total Rental Cost:$_______\n------------------------------\n"); scanf("%s%lf%lf%lf",&CustomerName,&Days,&Miles,&Gallons); costofDays=costperDay*Days; costofMiles=costperMile*Miles; costofGallons=costperGallon*Gallons; TotalRentalCost=costofDays+costofMiles+costofGallons; printf("Customer name:%s \n Num ber of days:%lf \n Number of miles:%lf \n Number of gallons:%lf \n------------------------------\n Total Rental Cost:$ %lf _______\n",CustomerName,Days,Gallons,Miles,TotalRentalCost); //Part 3 printf("----------------------------------------------------------------------\n Part 3"); }
run
|
edit
|
history
|
help
0
base
Primes in binary
Bitfield and Union in C - strange results
PPCG partial solution to https://codegolf.stackexchange.com/q/120870/61563
B_141104_TresPuntosTriangulo
double_buffer_madness
SUMALE UNO
My first structure
Sheldon 9 area none aliens as aliens and farms Lockheed Kelly and lame lead district 9
IndiSelSort