assignment 1 - float average; /* declares average as a...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Part A #1 Set x equal to 2 evaluate for a, using a= 3 x 3 − 5 x 2 + 6 Display value for a x=2 x3=8, 3*8=24 x2=4, 5*4=20 24-20+6=10 a=10 Part B #1 #include <stdio.h> int main() { int save1, save2, total; /* declares save1, save2, and total as integers */
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: float average; /* declares average as a double variable */ save1 = 5; save2 = 2; total = save1 + save2; average = total/2.0; printf (&quot;The average of 2 and 5 is %f\n&quot;, average ); return (0); }...
View Full Document

Page1 / 2

assignment 1 - float average; /* declares average as a...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online