C++ language

R4R® C++
(追記) (追記ここまで)
(追記) (追記ここまで)
Program Of Array

A Simple Array Example Using C++

#include<stdio.h>
#include<conio.h>
int main()
{
int myarray[5];
int i;
for(i=0;i<5;i++)
{
cout<<"Enter the value for array"["<<i<<"];
cin>>myarray[i];
}
for(i=0;i<5;i++)
cout<<i<<" : "myarray[i]<<"\n;"
return 0;
}

Output:

Enter the value of array[0] 3
Enter the value of array[1] 6
Enter the value of array[2] 9
Enter the value of array[3] 12
Enter the value of array[4] 15
0:3
1:6
2:9
3:12
4:15
(追記) (追記ここまで)
Copyright ©2021-22 r4r.co.in, all rights reserved. Theguestspost.com
Sitemap
Career
Post comment
About us
Subscription
Unsubscription

AltStyle によって変換されたページ (->オリジナル) /