Reference no: EM132209654
Answer the Following Questions :
1. Write a program containing a for loop which prints the integers from 100 down to 0 by ten that is, the first three lines should be 100, 90, 80...
2. Write a program that will find and print the first integer which is greater than 1000, and is divisible by 7.
3. Write a program to extract the fractional part of a number input by the user, using the function: fractional part =number -floor(number). For example, if the user inputs 3.5, then the outputs the fractional part 3.5-floor(3.5)=3.5-3=0.5; and if the user inputs 7.1, then the program out the fractional part 7.1-fbor(7.1)=7.1 -7=0.1.
4. Write a program to perform rounding on a floating point number input by the user, the fractional part of the number. For example, if the user inputs 2.5, then the number to be output the user inputs 7.7, then the output is 8; if the user inputs 11.4, then the output is 11.
Draft a report for each of the questions after you complete the coding, including the problem description, source codes, discussion with the program output captured in screen shots, and conclusions about the lab Please upload the lab reports to ePortfolio.
Write a program that dynamically creates pieces of storage
: Write a program that dynamically creates pieces of storage of the following types using new: int, long, an array of 100 chars, and an array of 100 floats.
|
Write a program that creates a 5 by 5
: Write a program that creates a 5 by 5, two-dimensional array that store 25 integers and the program will call five functions.
|
Write a program to estimate the future cost of an item
: Write a program to estimate the future cost of an item based on the current inflation rate and the current cost of the item.
|
Compute and display the average test score
: Write a program that computes and displays the average test score, highest test score and lowest test score of a set of test scores entered by a user.
|
Perform rounding on floating point number input by the user
: Write a program containing a for loop which prints the integers from 100 down to 0 by ten that is, the first three lines should be 100, 90, 80.
|
Write a program that converts centimeters to inches
: Your program should prompt the user to enter a height in centimeters, convert it to inches, and print the result to the console.
|
Assign the number of lines as class constant variable
: Write a program to create the following figure by using of nested for loops. Assign the number of lines as class constant variable in order to change the size.
|
Write a program that configures the uart for operation
: Write a program that configures the UART for operation at 115200 baud, 8 data bits, no parity and 1 stop bit (assume an 8 MHz clock for MSP430).
|
Write a program that contains a definition for data types
: Question :Write a program that contains a definition for each data type listed below in Microprocessor Assembly Language, using Assembly Code.
|