Introduction to Computer Science - Fall 2009
CSCI 151
Lab 10

  
Objectives:
increment and decrement operators
assignment operators for abbreviating assignment expressions
loops for and while
types int, float, double
logic operators
compiling and executing C code.   

HOME LAB ASSIGNMENT FOR WED NOV 18 CLASS
DUE DAY: by Wed, Nov 25, 1 pm - printout or e-mail

In class Lab Assignment for Monday, November 23, 2009

  • Program 1: Write a program that first reads one positive integer that will indicate an amount of input integer number that will come after that. The program will read the series of the integer numbers (amount of integer numbers will be equal to the first input number) and will find the sum of the even numbers that are divisible by 4 and their average. USE LOOP FOR in this program.

  • Program 2 Write a program that reads the series of 10 integer numbers and will find the sum of the odd input numbers, the amount of odd inputs among the input values and their average. Use loop for to solve this problem.

  • Program 3 Write a program that inputs a series of non-negative integers, a first negative integer indicates the end of the input sequence. The program determines and prints the amount of input numbers that are EVEN and divisible by 3 and their average. Your program should use loop WHILE