Describe why are the values of f and g different

Assignment Help Python Programming
Reference no: EM132355737

Question

1. What is this line of code doing?

scanf("%f", &height);

How would you change this line if you wanted to input an Integer as opposed to a float?

2. What are the values of f and g after executing the following C?

#include <stdio.h>

int main(void) { int i,j; float f,g; i = 5; j = 2; f = 3.0; f = f + j / i; g = (f + j )/i;

printf("value of f,g is %f,%fn", f,g); return 0; }

Describe specifically, and, why are the values of f and g different? Support your experimentation with a screen capture of executing the code.

Reference no: EM132355737

Questions Cloud

Construct confidence interval for population proportion : Construct a 99% confidence interval for the proportion of days with solar power generation above 43 kWh for City A.
Calculate the correlation in daily adjusted close and volume : Develop a new variable return, defined as the percentage change of a day's Adjusted Close compared to last trading day's Adjusted Close.
Write a program in r that prints the numbers from 1 to 100 : Show me a program in R that prints the numbers from 1 to 100. But for multiples of three print "Fizz" instead of the number and for the multiples of five print
Describe steps in the strategic planning process : In today's economic environment, which of the five steps in the strategic planning process do you think is the most important? Give an example of an industry.
Describe why are the values of f and g different : Describe specifically and why are the values of f and g different? Support your experimentation with a screen capture of executing the code.
What qualities do you associate with leadership : Are some people born leaders while the rest of us are destined to be followers? Conversely, is it possible for most everyone to acquire leadership skills.
Can your character be considered a hero : You may design a power point, a video, or anything else that this system will support. Can your character be considered a "hero"?
Describing the ancient wonder of the world : Thoughtfully and thoroughly answered all the questions when analyzing and describing the ancient wonder of the world in essay format (3 - 5 pages).
Tomorrow in an index fund of the wilshire : If you start making monthly deposits tomorrow in an index fund of the Wilshire 5000 and assume it will return 7% compounded monthly

Reviews

Write a Review

Python Programming Questions & Answers

  Write a python program to implement the diff command

Without using the system() function to call any bash commands, write a python program that will implement a simple version of the diff command.

  Write a program for checking a circle

Write a program for checking a circle program must either print "is a circle: YES" or "is a circle: NO", appropriately.

  Prepare a python program

Prepare a Python program which evaluates how many stuck numbers there are in a range of integers. The range will be input as two command-line arguments.

  Python atm program to enter account number

Write a simple Python ATM program. Ask user to enter their account number, and print their initail balance. (Just make one up). Ask them if they wish to make deposit or withdrawal.

  Python function to calculate two roots

Write a Python function main() to calculate two roots. You must input a,b and c from keyboard, and then print two roots. Suppose the discriminant D= b2-4ac is positive.

  Design program that asks user to enter amount in python

IN Python Design a program that asks the user to enter the amount that he or she has budget in a month. A loop should then prompt the user to enter his or her expenses for the month.

  Write python program which imports three dictionaries

Write a Python program called hours.py which imports three dictionaries, and uses the data in them to calculate how many hours each person has spent in the lab.

  Write python program to create factors of numbers

Write down a python program which takes two numbers and creates the factors of both numbers and displays the greatest common factor.

  Email spam filter

Analyze the emails and predict whether the mail is a spam or not a spam - Create a training file and copy the text of several mails and spams in to it And create a test set identical to the training set but with different examples.

  Improve the readability and structural design of the code

Improve the readability and structural design of the code by improving the function names, variables, and loops, as well as whitespace. Move functions close to related functions or blocks of code related to your organised code.

  Create a simple and responsive gui

Please use primarily PHP or Python to solve the exercise and create a simple and responsive GUI, using HTML, CSS and JavaScript.Do not use a database.

  The program is to print the time

The program is to print the time in seconds that the iterative version takes, the time in seconds that the recursive version takes, and the difference between the times.

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