Commit 33b1bdb5 authored by N. T. Crotser's avatar N. T. Crotser ✌🏼

Update main.c

parent 92a94112
......@@ -3,47 +3,61 @@
int main()
{
/* This application is intended to make determining cost of product/supplies purchased from Canature WaterGroup/Hydrotech Water much easier and fool proof.
In order to use this program, you'll need know what percentage off of list price you're buying at. If you don't know this please contact your sales rep.
*/
printf("Welcome to the Cost Calculator!\nVersion 0.01a\n\n");
printf(" $$ \n");
printf(" $$$$$$$$ CCCCC OOOOO SSSSS TTTTTT\n");
printf(" $$$ $$ CC OO OO SS TT\n");
printf(" $$$$$ CC OO OO SS TT\n");
printf(" $$$$ CCCCC OOOOO SSSSS TT\n");
printf(" $$$\n");
printf(" $$$ CCCCC AA LL CCCCC\n");
printf(" $$$$ CC AA AA LL CC\n");
printf(" $$$$$ CC AAAAAA LL CC\n");
printf(" $$ $$$ CCCCC AA AA LLLLL CCCCC\n");
printf(" $$$$$$$$ \n");
printf(" $$\n\n");
printf("This application is licensed under the Greater Lunduke License version 0.3\nThis program is provided AS-IS with NO WARRANTY\nFor more information, consult LICENSE.txt that accompanied this program\n");
printf("Cost Calculator © 2019 N.T. Crotser\n\n");
double multiply;
/* This application is intended to make determining cost of product/supplies purchased from Canature WaterGroup/Hydrotech Water much easier and fool proof.
In order to use this program, you'll need know what percentage off of list price you're buying at. If you don't know this please contact your sales rep.*/
printf(" $$ \n");
printf(" $$$$$$$$ CCCCC OOOOO SSSSS TTTTTT\n");
printf(" $$$ $$ CC OO OO SS TT\n");
printf(" $$$$$ CC OO OO SS TT\n");
printf(" $$$$ CCCCC OOOOO SSSSS TT\n");
printf(" $$$\n");
printf(" $$$ CCCCC AA LL CCCCC\n");
printf(" $$$$ CC AA AA LL CC\n");
printf(" $$$$$ CC AAAAAA LL CC\n");
printf(" $$ $$$ CCCCC AA AA LLLLL CCCCC\n");
printf(" $$$$$$$$ \n");
printf(" $$\n");
printf(" Welcome to Cost Calculator\n");
printf(" Version 0.5b\n");
/* printf(" TTTTTTTT HH HH HH HH EEEEE WW WW WW AA YY YY\n");
printf(" TT HH HH HH HH EE WW WW WW AA AA YY YY\n");
printf(" TT HHHHHHHH HHHHHHHH EEEEE WWWWWW AAAAAA YYYYY\n");
printf(" TT HH HH HH HH EE WW WW AA AA YY\n");
printf(" TT HH HH HH HH EEEEE WW WW AA AA YYYYY\n");
printf("\n");
printf(" OOO FFFF IIII LL\n");
printf(" OO OO FF II LL\n");
printf(" OO OO FFFF II LL\n");
printf(" OOO FF IIII LLLL\n");
*/
printf(" ---------------------------------------------------------------------------");
printf(" This application's source is available under the GLL version 0.3 \n");
printf(" and is provided AS-IS with NO WARRANTIES of ANY KIND! \n");
printf(" For more information, consult LICENSE.txt that accompanied this program \n");
printf(" Cost Calculator © 2019 N.T. Crotser \n\n");
double multiply;
double listprice;
double cost;
char sentinel = ' '; // sentinel for while loop
printf("Enter your cost multiplier: ");
scanf("%lf", &cost);
while(sentinel != 'q') // Use while loop instead of goto
{
printf("Enter the list price: ");
scanf("%lf", &listprice);
multiply = listprice * cost;
/* printf("The Item's List Price is: %f\n", listprice); */
printf("*Your Cost Is: %.2f*\n\n", multiply); // Limit trailing zeros
printf("c to Continue 'q' to Quit: "); // Illusory choice, 'q' is the only recognized choice
printf("Press 'q' to Quit otherwise → "); // Illusory choice, 'q' is the only recognized choice
scanf("%c", &sentinel);
}
}
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