0
Write a simple program with array, loop and if-else (all together in one program)
please help, need it asap :( THANK YOU SO MUCH!
2 Respostas
0
#include <iostream>
using namespace std;
int main(){
int arrayint = [50, 28, 63];
for(int j = 0; j < 3; j ++){
cout<<arrayint[ j ];
} if(2 == 3){
cout<<arrayint[0];
}else{
cout<<arrayint[2];
}
0
int main()
{
int array[5], i, n;
cout<<"enter no of input <5";
cin>>n;
if(n<=4)
{
for(i=0;i<=4;i++)
{
cin>>array[i] ;
}
for(i=0;i<=4;i++)
{
cout<<array[i] ;
}
}
else
{
cout<<" too many input";
}
}