Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Project #0 Review of C P ROBLEM S TATEMENT : Write a program that reads in a user-specified number of integers from the keyboard, stores
Project #0 Review of C PROBLEM STATEMENT: Write a program that reads in a user-specified number of integers from the keyboard, stores the integer values in an array, and outputs each element of the array to the screen along with an appropriate string literal. The program should be named testIntegerValues.c. Your program should do the following: 1. Read, from the keyboard, the number of integers that should be input.
- The number of integers specified should not exceed MAX_SIZE, where MAX_SIZE is the maximum size of the array.
- If the number of integers specified exceeds MAX_SIZE
- ** Declare a constant named MAX_SIZE with a value of 50. **
- Prompt the user to enter a single integer value.
- Read the integer value from the keyboard and store it in the array.
- Repeat until all values are read in from the keyboard.
- ** Declare an array of size MAX_SIZE. **
- Print one integer value, along with an appropriate string literal, on each line.
- The string literal that should be printed is determined as follows: ? if the value is divisible by 3, print divisible by 3 ? if the value is divisible by 4, print divisible by 4 ? if the value is divisible by both 3 and 4, print divisible by 3 and 4
- The integer value and the string literal should be separated by a tab.
Attachments:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started