Question: for a C++ lab im supposed to create a code that will take user input, square the number entered, divided the squared number by 3,

for a C++ lab im supposed to create a code that will take user input, square the number entered, divided the squared number by 3, and then display the answer with the remainder. all while using functions. so basically everything needs to be in funtions. im having troubles with the rest of the code, specifically squaring the user inputef number. please help.  for a C++ lab im supposed to create a code that
will take user input, square the number entered, divided the squared number
by 3, and then display the answer with the remainder. all while
using functions. so basically everything needs to be in funtions. im having

Tools Searc Fle 0 Edit 8 View . Project Build Debug Test Analyse 2.9. Debug - Win32 Extensions Window Help Local Windows Debugger. Lab 2 . x LAB2 #define CRT SECURE_NO_MARNINGS Beinclude #include . B/BBBBBBBBBB LAB 2: Using Functions Developed by: Taitun Laroque Date: Jan 14, 2020 Description: // function prototypes: void Purpose(void); int GetNumber(void); int Square(int number); float DivideByThree(int); int RemainderBythree(float): void Display(int a, float b, char c); Main OSEBBR Bvoid main(void) 1/Variable Declarations int GetNus; int Squaredum; float DividetyThree; int RemainderyThree; 1/user input Purpose(); Getum Getumber(); 1/Squared Square(); 1/Calculations mo eten Schation UDU Lab 2 . X SLAB 2 (Globe while (L_kbhit()); Purpose. This function prints the purpose of the program to the console. Inputs: none Returned: none void Purpose(void) printf(" This program will take a user input and square it, divide by 3"); printf(" and display the remainder"); GetNumber - This function requests the Integer number from the user and returns it to the calling function. Inputs: none Returned: The Integer given from user (int) gint GetNumber(void) int Number: printf(" Please insert Integer value here: "); fflush(stdin); scanf("1". Number); return Number: Square - calculates the square of the integer and returns the result. Input: The number from the calling function (int) Returned returns the squared value (int) gint Suare (int number Sauce (number number); return Square : 9 Grce A Warnings Menage bold bellisonce . Code Description S pected an expression on must be a modablake SABOR The intermediate directory Delragcontain the shared from another project(JAB 2. A Co r umuverneed local table A CADAT WW ted in der Insel indirection from w S h pernd must be CADAY Yumiwdienst pro This can lead to incorrect een android Tools Edit View 9. Project Build 2. Debug Test Analyze Debug - Win32 Extensions Window Help Local Windows Debugger B/**** DivideByThree - Divides the integer by three and returns the result. Input: The number from the calling function (int), Returned: Returns the divided number (float) * * /EBBE **************************SERERSESSE**********HERRESERBREE*********** RemainderByThree - Calculates the remainder of the integer entered divided by 3 and returns the result. Input: The number from the calling function (float) Returned: returns the remainder (int) **************************** B/83383 Display - This function displays the result to the console Inputs: Results from: Get Number (int), Square (int), DivideByThree (float), RemainderByThree (int) Returned: none 8888RSENS 2 At blution 1 3 Errors A4 Warnings | Messages Build IntelliSense Code Description E0029 expected an expression E0137 expression must be a modifiable value MSB802. The intermediate directory (Debug contains files shared from another project (ULAU 2. voproj). This can lead to incorrect dean and rebuild behavior C4101 SquaredNum': unreferenced local variable A C4047 '': 'intcdedXint differs in levels of indirection from 'int' 2106 ':left operand must be l-value A CA047 'return': 'int' differs in levels of indirection from intcdedint) For List Output ady Type here to search

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!