1. A phone number, such as (966) 767-8900, has three parts: the area code (966), the exchange (767), and the number (8900). Write a program that uses a structure to store these three parts of a phone number separately. Call the structure phone.
2. Create two structure variables of type phone. Initialize one, and have the user input a number for the other one. Then display both numbers.
Modify the program so that the program asks names of 10 persons and phone numbers. Use the phone structure in the previous exercise and create another structure that includes names of persons and phone structure
السؤال
Alone Moon
1. A phone number, such as (966) 767-8900, has three parts: the area code (966), the exchange (767), and the number (8900). Write a program that uses a structure to store these three parts of a phone number separately. Call the structure phone.
2. Create two structure variables of type phone. Initialize one, and have the user input a number for the other one. Then display both numbers.
Modify the program so that the program asks names of 10 persons and phone numbers. Use the phone structure in the previous exercise and create another structure that includes names of persons and phone structure
1 جواب على هذا السؤال
Recommended Posts
انضم إلى النقاش
يمكنك أن تنشر الآن وتسجل لاحقًا. إذا كان لديك حساب، فسجل الدخول الآن لتنشر باسم حسابك.