Mercurial Hosting > quickcalc
diff quickcalc.c @ 1:dfce17cc481b default tip
Autmatic Win32 Porting
author | VilyaemKenyaz |
---|---|
date | Thu, 28 Sep 2023 13:21:58 -0400 |
parents | 9bf878c59a1d |
children |
line wrap: on
line diff
--- a/quickcalc.c Fri Aug 25 13:42:00 2023 -0400 +++ b/quickcalc.c Thu Sep 28 13:21:58 2023 -0400 @@ -1,4 +1,4 @@ -// A simple calculator, if no arguments do wizard mode. +// A simple calculator #include <stdio.h> #include <stdlib.h> @@ -9,8 +9,8 @@ if (argc == 1) { puts("Quickcalculator 1Add 2Sub 3Mul 4Div"); exit(1);} // Get numbers - unsigned int value1 = atoi(argv[1]); - unsigned int value2 = atoi(argv[3]); + int value1 = atoi(argv[1]); + int value2 = atoi(argv[3]); // Determine operation unsigned int operation = atoi(argv[2]); // addition subtraction multiplication division