Question: can you solve this quastion usin dev c++ also please use input from the screen shot above to test your program. TECHNOLOGY KING FAISAL UNIVERSITY,

TECHNOLOGY KING FAISAL UNIVERSITY, SAUDI ARABIA Lab task 2: Programming Instructions Create a C++ program that will solve the given programming problemes below. Programming Problem 1 - File Name: Arca.cpp Description: The phone company is running out of telephone numbers and needs to institute 10-digit dialing. When using 10-digit dialing, the area code for the phone number must always be added onto the actual phone number even when dialing a local number. Ali really hates doing this, but luckily, he has a cool phone. He can program it so that if he dials a number which begins with a digit other than the first digit in his area code, the phone will automatically insert his area code first. Tf Ali dinis a number that begins with the same digit us his area code the phone will not insert Alisse code (since it cannot distinguish between a 7-digit number or if Ali has remembered to use the area code). Write a program to simulate this phone The Problem: Given a 7-digit phone number, add the area code if the first digit of the number does not match the first digit of Ali's area code which is 407. Input Format: Input will begin with a single positive integer, N, on the first line, indicating how many phone numbers to process. The next line of input will contain N phone numbers in mm format separated by a space. Example Input: 5556473 4118376 Output Format: For cach phone number, output the new phone number with area code added if the first digit of the phone number does not match Ali's area code first digit. each N should be printed in separate line. Follow the format shown in the Example Output below, Example Output: (407) 5556473 4118376 COLLEGE OF COMPUTER SCIENCES & INFORMATION TEGHNOLOGY KIRE FAISAL UNIVERSITY, SAUDI ARABIA Example Program Execution 2 5556473 4118376 (407) 5556473 4118376 5124578 4441258 6235678 4123568 (407) 5124578 (487) 6235678 4123568 4441258 Note: Use the input from the screen shot above to test your program
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
