Question
How to hold the screen
Visual studio 2015
Which input I have to put and where



Debug x86 Local Windows Debugger N z 3 3 N Applica
Debug x86 Local Windows Debugger N z 3 3 N Applica
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Ok fine Let me Explain the code first to you i.e what exactly happens when you execute the program.

Intially main() (main method) is called i.e where the execution of the program begins. Provide the inputs for a,b,c and the function result(a,b,c,trianglearea,triangleperimeter) is called . now the pointer moves to the result() function .The result() function should pass the values such as trianglearea,triangleperimeter to the main() function so the return type of the function should not be void instead it should be int or double (if you want an integer value return type should be int similarly double).

return the values of trrianglearea,triangleperimeter by making it as a single value (i.e making pair)

make_pair(trianglearea,triangleperimeter) . make_pair is the function present in utility.h header file

Now the funtion result() returns a value to the main method now the main method should hold the values since the scope the variables are different i.e trianglearea,triangleperimeter has local scope

now there are stored in variables as x,y temporarly.

tie(x,y)=result(a,b,c,&trianglearea,&triangleperimeter) // tie is method used to unpack the varibales and it is present in tuple.h

the output statement should be as

cout<<"Areaof triangle"<<x<<"perimeter"<<y<<endl;

Add a comment
Know the answer?
Add Answer to:
How to hold the screen Visual studio 2015 Which input I have to put and where...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • I'm not getting out put what should I do I have 3 text files which is...

    I'm not getting out put what should I do I have 3 text files which is in same folder with main program. I have attached program with it too. please help me with this. ------------------------------------------------------------------------------------ This program will read a group of positive numbers from three files ( not all necessarily the same size), and then calculate the average and median values for each file. Each file should have at least 10 scores. The program will then print all the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT