C program

Anonymous
timer Asked: Jan 1st, 2018
account_balance_wallet $15

Question description

please see the attachment in order to know what are the requirements. you should work on the C program, all what you have to do is to type the requirements in the C program , they are really easy

ECE 102 Assignment #10 The odd Function An odd function of 3 binary variables (i.e., the variables have to be either 0 or 1, and nothing else) is defined as follows: the output is equal to 1 if the input variables have odd number of 1’s. The output is 0 otherwise. For example, • If the three input variables are 1,1, and 0, respectively, then the output is equal to 0 since there are even number of 1’s (two, in this case). • If the three inputs are 0, 1, 0, then the output is 1. Write a program that prompts the user to enter binary values for the three inputs and calculate and display the result. Your program should have appropriate error checking. Hint: check the sum of the three binary variables. Pre-lab assignment 1. Write down the first three steps of problem solving. 2. Write down the detailed pseudocode. Remember to include error checking.
ECE 102 Assignment #11 Temperature Conversion Write a temperature conversion program. The program should prompt the user to enter a temperature and its unit (as a single character). If the user enters C (for Celsius), the output should be the equivalent temperature in Fahrenheit. For example, if the user enters 100C, the program should output 212F. But if the user enters F (for Fahrenheit), the output should be the equivalent temperature in Celsius. For example, if the user enters 32F, the program should output 0C. If the user enters any other characters, show an error message. Hint: there are two inputs, one is a number and the other is a character. Pre-lab assignment 1. Write down the first three steps of problem solving. 2. Write down the detailed pseudocode. Remember to include error checking. Note: important formatting details when entering characters. Suppose there are two variables declared as follows: float points; char grade; If there is a space between %f and %c in the scanf command as shown below, scanf(“%f %c”, &points, &grade); you need to enter a space between the number and the grade as 100 A If there is no space between %f and %c in the scanf command as shown below, scanf(“%f%c”, &points, &grade); you should not enter space or enter key either when running the program. You should enter as 100A. Otherwise the space will be saved in the variable grade. Technically space and enter key are characters. A more fool-proof way is to enter points and grade in separate commands: printf(‘Enter the points”); scanf(“%f”, %points); printf(“enter the grade”); flush(stdin); /* to flush out from input buffer any spaces or enter keys previously entered*/ scanf(“%c”, &grade);

Tutor Answer

profnelsons
School: Cornell University

Attached.

Running head: PROGRAMMING IN C

C Program
Ali Almusallam
Institution Affiliation

PROGRAMMING IN C
ECE 102

Assignment #10

The odd Function

Write a program that prompts the use...

flag Report DMCA
Review

Anonymous
Totally impressed with results!! :-)

Similar Questions
Hot Questions
Related Tags

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors