Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Business Management Expert

Please see the instructions below. The feedback received from the code I wrote and submitted was "The code only carries out 2 of the 4 required calculations using expressions"

Please see the included code below and let me know what I'm missing and how to fix.

Thanks

Instructions

Write a single program that prints the results of two arithmetic expressions using integers and the results of two floating-point calculations. Print out both the arithmetic expressions and the answers calculated by the code. For this program, it is fine to use "hard-coded" values (the numbers used in the calculations are provided in the code) rather than user input. Be sure to format the code correctly and include relevant comments in the source code (including the comment at the top of the file with your name and identification of the program).

/* Two arithmetic expressions with integers and floating point calculations*/

#include
int main()
{
    //integer a=5 and b=10
    int a=5, b=10, c;

    //fractional numbers 2.5 and 3.6 calculate
    float x=2.5, y=3.6, z;

    /*actual initialization*/
    c=a+b;
    z=x+y;

    //print newline a=5 b=10
    printf("n a=5, b=10");

    //print newline x=2.5 y=3.6
    printf("n x=2.5, y=3.6");

    //print new line int a + b =c
    printf("n %d + %d =%d",a,b,c);

    //print new line float x + y =z
    printf("n %f + %f =%.2f",x,y,z);

    //print new line
    printf("n");
    return 0;

Business Management, Management Studies

  • Category:- Business Management
  • Reference No.:- M92084601
  • Price:- $20

Priced at Now at $20, Verified Solution

Have any Question?


Related Questions in Business Management

Given the information in the table answer the following

Given the information in the table, answer the following questions. Year 2001 nominal GDP 500 Real GDP 400 Real interest rate 3% Year 2002 nominal GDP 545 Real GDP 420 Real interest rate 4% Year 2003 nominal GDP 620 Real ...

Describe the needs-based theories of motivation give one

Describe the needs-based theories of motivation. Give one example

How global management perspective course benefit your

How Global Management Perspective course benefit your personal and/or professional development? What did you find most beneficial about the course?

How is vision used to confrontnbspresistance to change and

How is vision used to confront resistance to change, and move through it? How can a shared vision possibly facilitate collaboration or ultimately the successful implementation of a change initiative?

Given a variable electionresults that is associated with a

Given a variable, election_results, that is associated with a dictionary that maps candidate names to votes received, associate the name of the candidate with the most votes with the variable winner.

What issues may arise from the person with the particular

What issues may arise from the person with the particular religious preference, those around that person who may be interested in opportunties that person is being tapped for, and for the organization in building their b ...

You work in a veterinarians office and need to organize the

You work in a Veterinarian's office and need to organize the data on pets that you treat. In your database, you want to keep track of the following information: Customer information: Name Address City State ZIP Phone # Y ...

Examples of national quality control models whats are the

Examples of national quality control models? whats are the key concepts?

Create brochure that could be given to people considering

Create brochure that could be given to people considering starting their own business and who want to know the key considerations when developing a business plan and determining the best methods of managing the business' ...

What are the different types of survey research error and

What are the different types of survey research error and describe an example of each.

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As