Prob. 1

Write an interactive program that will read in a positive integer value and determine the following:

1. The integer is an even number or not.

2. The integer is a number divisible by 10

Write the program that can repeatedly prompt the user to enter an integer, until a zero or a negative value is inputted by the user.

Note: Use only while loops along with if statements. Use appropriate Math functions.

NOTES FOR PROBLEM 2

  • THE CODE PROVIDED FOR PROBLEM 2 SHOULD NOT BE TYPED, OR COMPILED OR EXECUTED.
  • THE ANSWER TO PROBLEM 2 SHOULD BE BASED ON UNDERSTANDING THE CODE BY VISUAL INSPECTION ONLY.
  • SOLUTIONS TO PROBLEM 2 HAS TO BE SUBMITTED IN A WORD DOCUMENT.
  • HAND WRITTEN SOLUTION WILL NOT BE GRADED
  • ANY KIND OF VIOLATION OF THE ABOVE RULES AND REQUIREMENTS WILL RESULT IN AWARDING OF ZERO POINTS FOR THE ENTIRE ASSIGNMENT.

Prob. 2

For the program given below, write the output that will be printed on the screen, and justify the output with detailed reasons.

#include < iostream>
#include < iomanip>
using namespace std;
int main(void)
{
float i = 1.0/3.0;
cout< cout.setf(ios::left);
cout< int k = 10;
cout< int m = 20;
cout< cout< cout< return 0;
}
Academic Honesty!
It is not our intention to break the school's academic policy. Projects posted are only used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly fill out the form. Please provide a valid email address and we'll get back to you in less than 24 hours. We will be sending an invoice through PayPal upon confirmation. We are a non profit organization however we need an amount to keep this organization running, and to be able to complete our research and development.