ET-2560 Homework Unit 4 Assignment 1
Assuming x is 15.0 and y is 25.0, what are the values of the following conditions? x != y 1(true) x < x 0(false) x >= y-x 1(true) x == y + x – y 1(true) 5. What value is assigned to the type int variable ans in this statement if the value of p is 100 and q is 50? ans = (p > 95) + (q < 95); 1(true) Section 4.3 1. What does this statements display? a. if (12 < 12) printf (“less”); else printf (“not less”); It would display not less.
Background image of page 1
Info iconThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentRight Arrow Icon
Tanya Gonzales ET-2560 Homework Unit 4 Assignment 1 2. What value is assigned to x when y is 10.0? a. x = 25.0; if (y != (x – 10.0 ) ) x = x – 10.0; else x = x / 2.0; Section 4.4 2. Correct the following if statement; assume the indentation is correct. if ( deduct < balance); balance = balance – deduct; printf(” New balance is %.2f\n”, balance); else printf(” Deduction of %.2f refused\n”, deduct); printf(” Would overdraw account\n”); printf(” Deduction = %.2f Final balance = %.2f\n”, deduct, balance); Section 4.7
Background image of page 2
Tanya Gonzales ET-2560 Homework Unit 4 Assignment 1 1. Trace the execution of the nested if statement in
WRITE THIS ESSAY FOR ME
Tell us about your assignment and we will find the best writer for your paper.
Get Help Now!Introducing our Online Essay Writing Services Agency, where you can confidently place orders for a wide range of academic assignments. Our reputable homework writing company specializes in crafting essays, term papers, research papers, capstone projects, movie reviews, presentations, annotated bibliographies, reaction papers, research proposals, discussions, and various other assignments. Rest assured, our content is guaranteed to be 100% original, as every piece is meticulously written from scratch. Say goodbye to concerns about plagiarism and trust us to deliver authentic and high-quality work.



