assignment 1

# assignment 1 - float average declares average as a double...

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

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 */

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

View Full Document
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 ("The average of 2 and 5 is %f\n", average ); return (0); }...
View Full Document

## This document was uploaded on 01/22/2011.

### Page1 / 2

assignment 1 - float average declares average as a double...

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

View Full Document
Ask a homework question - tutors are online