forked from gkthiruvathukal/comp310-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
localdmluser
authored and
localdmluser
committed
Jan 30, 2024
1 parent
7dd52b1
commit 936aac2
Showing
2 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include <stdio.h> | ||
|
||
int main(int argc,char ** argv){ | ||
double num1,num2; // initialize numbers | ||
// ask for input from the user | ||
printf("Enter first number: "); | ||
scanf("%lf",&num1); | ||
printf("Enter second number: "); | ||
scanf("%lf",&num2); | ||
|
||
// print calculations | ||
printf("Sum: %lf\n",(num1+num2)); | ||
printf("Difference: %lf\n",(num1-num2)); | ||
printf("Product: %lf\n",(num1*num2)); | ||
printf("Quotient: %lf\n",(num1/num2)); | ||
return 0; | ||
} |