Write a C++ program that declares a two dimensional array of size5 called xy[5][5] and generates the values of its eleme
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Write a C++ program that declares a two dimensional array of size5 called xy[5][5] and generates the values of its eleme
Write a C++ program that declares a two dimensional array of size5 called xy[5][5] and generates the values of its elements using conditional statements as the following: • The main diagonal contains 0 in all its locations. • The upper triangle contains random numbers between x+2 and y+9 in all its locations, where x and y are the last two digits of your ID. • The lower triangle contains random numbers between 2 and 9 in all its locations. Display the resulted array on the screen and store it in a file called green.txt. Attach to your solution the following: • C++ code that can be checked (not a picture) .cpp file or just copy and paste your work here. • Screenshot of the results. Green.txt file.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!