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