Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You ate to write a small program that takes two numbers as input (use cerr), calls a function that compares their sum and reports (true/false)

image text in transcribed
image text in transcribed
You ate to write a small program that takes two numbers as input (use cerr), calls a function that compares their sum and reports (true/false) whether the sam is greater than 10. The program will output either The sun is greater than 100or The sum is less than on equal to 10 For this lab, the function has been provided and you must write the main function, which: 1. Ask for two numbers (use cerr) and use cin to input them into two integers. 2. Call the coinpareto1e function. it takes fwo integers as input parameters and returns true if the sum of the two numbers is greater than 10. and false if the numbers are bess than or equal to 10 . The function prototype/deciaration is bool eomparetoto (int flrat, int second) This prototype must appeat in your program before the function is caliod Troubleshooting If you reoceve thes error /uaf/bin/1d: /tup/eojtwVet. of in function (conparetoto(int, int) * ugetune.cppi (.text+0x0) t multiple dotinition of comparetolo(int, int ); coliedtid extott ld raturned I exit atatua Take a look at the gt+ corrple line. Note that both comparefunction. cpp and usefunc. cpp are compikd. That ick the conparetole function definition is afready probied in comparefunction, cpp Remove it from usefunc. cpp. However, be sure to add the function declaration (also called the function prototype) to usefunc. cpp lut before the main() write cxxx

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

Informix Database Administrators Survival Guide

Authors: Joe Lumbley

1st Edition

0131243144, 978-0131243149

Students also viewed these Databases questions

Question

What does the start( ) method defined by Thread do?

Answered: 1 week ago