Question Details

(Solution document) My code is not compiling correctly you someone take a look #include <stdio.h> int Square(int value); int Cube(int value); int Shrink(int...


My code is not compiling correctly you someone take a look




#include

int Square(int value);

int Cube(int value);

int Shrink(int value);

int main ()

{

/* variable definition: */ 

  int intValue, menuSelect,Results;

  intValue = 1; 

  // While a positive number

while (intValue > 0)

{  

   printf ("Enter a positive Integern: ");

   scanf("%d", &intValue);

  if (intValue > 0)

  {

   printf ("Enter 1 to calculate Square, 2 to Calculate Cube, 3 to Calculate Shrinkn: ");

   scanf("%d", &menuSelect);

   if (menuSelect == 1)

   {

    // Call the Square Function

    Results = Square(intValue);

    printf("Square of %d is %dn",intValue,Results);

   }

   else if (menuSelect == 2)

   {

    // Call the Cube function

    Results = Cube(intValue);

    printf("Cube of %d is %dn",intValue,Results);

   }

   else if (menuSelect ==3)

// Call the Shrink Function

    Results = Shrink(intValue);

    printf("Shrink of %d is %dn",intValue,Results);

}


   else 

    printf("Invalid menu item, only 1 or 2 is acceptedn");

   }   

  }   

return 0;

}

/* function returning the Square of a number */

int Square(int value)

{

return value*value;

/* function returning the Cube of a number */

int Cube(int value)

{

  return value*value*value;

/* function returning the Shrink of a number */

int Shrink(int value)

{

  return value*value/2;

}

 


Solution details:
STATUS
Answered
QUALITY
Approved
ANSWER RATING

This question was answered on: Dec 08, 2020

PRICE: $15

Solution~000652147569873.zip (25.37 KB)

Buy this answer for only: $15

This attachment is locked

We have a ready expert answer for this paper which you can use for in-depth understanding, research editing or paraphrasing. You can buy it or order for a fresh, original and plagiarism-free solution (Deadline assured. Flexible pricing. TurnItIn Report provided)

Pay using PayPal (No PayPal account Required) or your credit card . All your purchases are securely protected by .
SiteLock

About this Question

STATUS

Answered

QUALITY

Approved

DATE ANSWERED

Dec 08, 2020

EXPERT

Tutor

ANSWER RATING

GET INSTANT HELP/h4>

We have top-notch tutors who can do your essay/homework for you at a reasonable cost and then you can simply use that essay as a template to build your own arguments.

You can also use these solutions:

  • As a reference for in-depth understanding of the subject.
  • As a source of ideas / reasoning for your own research (if properly referenced)
  • For editing and paraphrasing (check your institution's definition of plagiarism and recommended paraphrase).
This we believe is a better way of understanding a problem and makes use of the efficiency of time of the student.

NEW ASSIGNMENT HELP?

Order New Solution. Quick Turnaround

Click on the button below in order to Order for a New, Original and High-Quality Essay Solutions. New orders are original solutions and precise to your writing instruction requirements. Place a New Order using the button below.

WE GUARANTEE, THAT YOUR PAPER WILL BE WRITTEN FROM SCRATCH AND WITHIN A DEADLINE.

Order Now