Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

By using c++ programming 3.1 Task One Type the following code into your coding environment to verify the purposes of the functions # include 2void

By using c++ programming image text in transcribed
image text in transcribed
image text in transcribed
3.1 Task One Type the following code into your coding environment to verify the purposes of the functions # include 2void print_star (void) : void main (void) 3 void print-message (void); 5 print star print message O print star 10 void print star (void) 11 E 12 13 14 void print message (void) 15 16 17 printf(" How do you don") Question: 1) What is the output of the program when execute it? 2) What are the purposes of line 2-3? 3) Summarize the steps of using user-defined functions in C 3.2 Task Two The following program two values entered by user. You are asked to complete the code finds the max number between #include-stdio.h> int max (int int); void main void) int a, b,c printf( Please input two integer values:"); c- max(a,b); printf(the max number you entered is %dn", c); return 0; // define function here int z; if (xyz-X;) elsez-y) return Questions 1) How function gets information from the main function who calls it? 2) Does the function change the value that is passed to it? 3.3 Task Three Write a program to calculate the distance between two points A(xl,yl) and B(x2,y2), where xl, yl, x2, y2 are read from a file. The calculation should be done by calling a function named distance. This function takes four arguments (xl, yl, x2, and y2) and returns the value of the distance between the two points

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

JDBC Database Programming With J2ee

Authors: Art Taylor

1st Edition

0130453234, 978-0130453235

More Books

Students also viewed these Databases questions

Question

F P %

Answered: 1 week ago