Results of two arithmetic expressions

Assignment Help Business Management
Reference no: EM131330015

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<stdio.h>
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;

Reference no: EM131330015

Questions Cloud

Think of any issue you would like to resolve : Think of any issue you would like to resolve. Utilizing the leading by objectives (LBO) process, lead your imaginary team through all of the steps to resolve your issue.As a police supervisor, do you feel you are more of a Category I or Category I..
Find rotational partition function for chloroacetylene gas : The rotational partition function for a sample of carbonyl sulide (OCS) is found to be 25.0. Above roughly what J value do we expect to see the population (the number of molecules per J level) rapidly decreasing?
Organize training for new leaders entering your organization : Your boss has just given you the task of helping organize a training for new leaders entering your organization. She mentioned that you will be expecting 10 new employees for the training, and she wants you to be in charge of preparing them for th..
Find a publicly traded company : Find a publicly traded company and discuss the dividend it pays from the perspective of retention ratio, plowback ratio and dividend yield.
Results of two arithmetic expressions : Write a single program that prints the results of two arithmetic expressions using integers and the results of two floating-point calculations.
What are costs of the advertised security specific training : Using a Web browser or local newspaper, search for advertisements for training and education in security- and technology-related areas.
What financial goal does stanley seem to be focusing : Seven years ago, after 15 years in public accounting, Stanley Booker, CPA, resigned his position as manager of cost systems for Davis, Cohen, and O'Brien Public Accountants and started Track Software, Inc. In the 2 years preceding his departure from ..
Conduct a swot analysis on the case study company csr : Conduct a SWOT analysis on the case study company's CSR and business ethics practices. Create a case study analysis focusing on the company's abuse and fraudulent activities relative to CSR and business ethics
Design five security posters on various aspects of infosec : Design five security posters on various aspects of InfoSec using a graphics presentation program and clipart.- Bring the posters to class and discuss the methods you used to develop your materials.

Reviews

Write a Review

Business Management Questions & Answers

  The public comment period closes on an osha proposed

The public comment period closes on an OSHA proposed regulation as well as your business had filed a public comment against the proposed regulation illumination that the regulation would not fix the problem that OSHA

  Why are separate expense and revenue accounts

Why are separate "expense" and "revenue" accounts used when all revenues and expenses could be shown directly in the retained earnings account?

  Portfolio in the quotation of the shares

What is the influence of auto portfolio in the quotation of the shares?

  Measures of univariate variable description

1: Explain the measures of univariate variable description that we have (i.e., frequency, central tendency, and dispersion). What do these measures tell us? Why are they useful?

  Describe the business leaders views on leadership

Describe the business leader's views on leadership. Identify and describe one example of their leadership abilities. Identify and describe a second example of their leadership abilities.

  Health departments in healthcare

Discuss the role that state and local health departments have in healthcare. Describe the purpose, function, and mechanisms of the CER Model you recommend. Identify the benefits of implementing this CER system.

  Anhueser-busch inbev use between global strategy

What combination of strategies does Anhueser-Busch InBev use between global strategy, home replication strategy, transnational strategy, or multi domestic strategy? (1 and a half to 2 page double space response would be great!)

  What are your fixed costs for school

a. What are your fixed costs for school, i.e. even if you chose to never attend class thissemester, what costs did you have to pay?

  Call provision gives the firm

The bond's indenture indicates that the call provision gives the firm the right to call the bonds at the end of each year beginning in Year 5. In Year 5, the bonds may be called at 109% of face value; but in each of the next 4 years.

  Determine two specific forces in the external environment

Determine two specific forces in the external environment that will have the most impact on your organization. Provide a rationale for your decision.

  After-tax cost of debt on the bond

Belton distribution company is issuing a 1,000 par value bond that pays 7.0 percent annual interest and matures in 15 years that is paid semi-annually. Investors are willing to pay 958 for the bond T he company is in the 18 percent marginal tax b..

  Practice we have to deviate from an ideal model

Why would a noted business researcher say, "It is essential that we always keep in mind the model of the controlled experiment, even if in practice we have to deviate from an ideal model"?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd