CyberSlug Rules!

Beginner Programming CMPS060

Prof. Paulo Franca

Home

Syllabus

Login

Objects

Download

Staff only

Sample problems with arrays:

Write a function that counts how many elements in an array are less than zero. The function takes two arguments: an array of integers and an integer that determines how many elements should be examined in the array.

 

Write a program that reads an array of up to 10 names from the keyboard. After the names are read, ask the user to input another name. The program then determines if this new name is in the list or not.