السلام عليكم ورحمة الله وبركاته
انا عملت البرنامج بس فيه اشياء بسيطه ما اعرف لها
وهذا هوه السوال
Write a C++ program that will:
(1) Define an array of 10 integers
(2) Read the 10 integers of the array from the user
(3) Print out the array elements on the screen
(4) Increment each array element by 1
(5) Print out the array elements on the screen
Note: You must use loops in (2), (3), (4), and (5)
You need to submit a print out of the C++ code and the execution results (on the black window)]
وهنا محاولتي
#include<iostream.h>
#include<conio.h>
void main()
{
int a [10];
int i;
for (i=0 ; i<10 ; i++)
{
cin>>a;
}
for (i=0 ; i<10 ; i++)
{
cout<<a<<"\n";
}
for(i=0 ; i<10 ; i++)
{
cout<<a+1<<"\n";
}
getch();
}