Question: Problem 2 (10 points) Consider the following C++ program. The program makes use of a function first 3digits that returns the number formed by the

Problem 2 (10 points) Consider the following C++ program. The program makes use of a function first 3digits that returns the number formed by the first 3 digits of its input argument as its result. So for example, first3digits(12345678) would be 123 Make sure to use your own 8-digit CUNY ID number as the number entered as input to the program. It would be a very bad idea to give answers based on another student's ID number! int mainot int id, n, x = 100, y = 17, z = 19; cout > id; // assume that the user types YOUR OWN CUNY ID number cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
