1 #include<_1 2 /*This function gets the sum of 2 numbers, 3 4 5 6 7 } 8 14 } 15 16 17 18 19 { ( 9 10 /*This function gets the difference of 2 numbers, Function takes no 2 floats and returns a float*/ 11 8 diff_float(_9_ num1,_10_ num2) 12 { 13 _11__12_ _13_ _14_; 22 23 20 21 } wwwwww N N N ! 27 24 25 26 { /*This function gets the product of 2 numbers, Function takes no 2 floats and returns a float*/ 15 prod_float(_16_num1, _17_ num2) _18__19__20_21___; Function takes no 2 floats and returns a float*/ sum_float(_3_ num1,4 num2) _5__6_ +_7_; /*This function gets the division of 2 numbers, Function takes no 2 floats and returns a float*_22_ div_float(_23_ num1, _24_ num2) _25__26_ _27__ _28_; 28 } 33 { 34 35 } 29 30 /*This function gets the remainder of 2 numbers, 31 32 Function takes no 2 integers and returns an integer*/ 29 mod_int(_30_num1, 31 num2) _32_33__34__35_; |

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 6PE
icon
Related questions
Question

Programinf language is C

36
37 int main()
38 {
39
40
41
42
43
44
45
46
47
48
49
50
51
52 }
int il, 12;
float f1, f2;
printf("I'm a calculator. Enter 2 interger numbers, and 2 float numbers: ");
scanf("%d %d %f %f", &il, &i2, &f1, &f2);
//Call 5 functions, and print the answers
printf("\nI have finished calculating. Here are the logistics:\n");
printf("%.2f + %.2f = %.2f\n", f1, f2, sum_float(f1, f2));
printf("%.2f + %.2f = %.2f\n", f1, f2, diff_float(f1, f2));
printf("%.2f + %.2f = %.2f\n", f1, f2, prod_float(f1, f2));
printf("%.2f + %.2f = %.2f\n", f1, f2, div_float(f1, f2));
printf("%d %% %d = %d", il, i2, mod_int(i1,i2));
return 0;
Transcribed Image Text:36 37 int main() 38 { 39 40 41 42 43 44 45 46 47 48 49 50 51 52 } int il, 12; float f1, f2; printf("I'm a calculator. Enter 2 interger numbers, and 2 float numbers: "); scanf("%d %d %f %f", &il, &i2, &f1, &f2); //Call 5 functions, and print the answers printf("\nI have finished calculating. Here are the logistics:\n"); printf("%.2f + %.2f = %.2f\n", f1, f2, sum_float(f1, f2)); printf("%.2f + %.2f = %.2f\n", f1, f2, diff_float(f1, f2)); printf("%.2f + %.2f = %.2f\n", f1, f2, prod_float(f1, f2)); printf("%.2f + %.2f = %.2f\n", f1, f2, div_float(f1, f2)); printf("%d %% %d = %d", il, i2, mod_int(i1,i2)); return 0;
7
8
9
Use the screenshots and/or the files from the Google Drive Link in the instruction above to fill in the blanks.
There are lots of screenshots here, so I minimize the size. You can zoom in to see better.
Each blank has a format of_slotnumber_ in the code files (or the screenshots)
1
2
3
4
5
6
7
29
30
8
9
10
11=
1 #include<
2
3
4
5 {
6
type your answer.....
12 type your answer...
}
type your answer...
type your answer...
type your answer.....
type your answer...
type your answer...
type your answer...
type your answer.....
type your answer....
type your answer....
type your answer...
10
11
12 {
13
14}
15
16
17
/*This function gets the sum of 2 numbers,
Function takes no 2 floats and returns a float*/
sum_float(_3_ num1,4_ num2)
18
19 {
20
21 }
22
23
24
25
26 {
27
28 }
13- type your answer...
14- type your answer....
15
type your answer...
16
type your answer...
17
type your answer...
18
type your answer...
19
type your answer...
20
type your answer...
type your answer...
22
type your answer.....
23- type your answer...
24 type your answer...
21
/*This function gets the difference of 2 numbers,
Function takes no 2 floats and returns a float*/
8 diff_float(_9_ num1, 10 num2)
_5__6_ + _7_;
31
32
33 {
34
35 }
25- type your answer...
26
type your answer...
27
type your answer...
28
type your answer...
29
type your answer...
30 type your answer...
31
type your answer...
32
type your answer...
33 type your answer...
34 type your answer.....
35= type your answer.....
__11__12_ _13_ _14____;
/*This function gets the product of 2 numbers,
Function takes no 2 floats and returns a float*/
_15_prod_float(_16_ num1, _17_ num2)
_18__19__20_ _21__;
/*This function gets the division of 2 numbers,
Function takes no 2 floats and returns a float*/
_22_ div_float(_23_ num1,_24_ num2)
_25__26_ _27__ _28_;
/*This function gets the remainder of 2 numbers,
Function takes no 2 integers and returns an integer*/
29 mod_int(_30_ num1, 31 num2)
_32_33__34__35_;
|
Transcribed Image Text:7 8 9 Use the screenshots and/or the files from the Google Drive Link in the instruction above to fill in the blanks. There are lots of screenshots here, so I minimize the size. You can zoom in to see better. Each blank has a format of_slotnumber_ in the code files (or the screenshots) 1 2 3 4 5 6 7 29 30 8 9 10 11= 1 #include< 2 3 4 5 { 6 type your answer..... 12 type your answer... } type your answer... type your answer... type your answer..... type your answer... type your answer... type your answer... type your answer..... type your answer.... type your answer.... type your answer... 10 11 12 { 13 14} 15 16 17 /*This function gets the sum of 2 numbers, Function takes no 2 floats and returns a float*/ sum_float(_3_ num1,4_ num2) 18 19 { 20 21 } 22 23 24 25 26 { 27 28 } 13- type your answer... 14- type your answer.... 15 type your answer... 16 type your answer... 17 type your answer... 18 type your answer... 19 type your answer... 20 type your answer... type your answer... 22 type your answer..... 23- type your answer... 24 type your answer... 21 /*This function gets the difference of 2 numbers, Function takes no 2 floats and returns a float*/ 8 diff_float(_9_ num1, 10 num2) _5__6_ + _7_; 31 32 33 { 34 35 } 25- type your answer... 26 type your answer... 27 type your answer... 28 type your answer... 29 type your answer... 30 type your answer... 31 type your answer... 32 type your answer... 33 type your answer... 34 type your answer..... 35= type your answer..... __11__12_ _13_ _14____; /*This function gets the product of 2 numbers, Function takes no 2 floats and returns a float*/ _15_prod_float(_16_ num1, _17_ num2) _18__19__20_ _21__; /*This function gets the division of 2 numbers, Function takes no 2 floats and returns a float*/ _22_ div_float(_23_ num1,_24_ num2) _25__26_ _27__ _28_; /*This function gets the remainder of 2 numbers, Function takes no 2 integers and returns an integer*/ 29 mod_int(_30_ num1, 31 num2) _32_33__34__35_; |
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT