0
Help me if my program is right or not đđ
Write c++ program to read [15 values] from user by using array, then display the first 6 values? â«:My program ⏠#include <iostream> using namespace std; int main() { int b[15]; cout<<"Enter 15 values : \n"; for ( int i = 0; i < 15; i++ ) cin>>b[i]; cout<<"The first 6 values is :\n"; for ( int i = 0; i < 6; i++ ) cout <<b[i]<<"\n"; return 0; } It is right or not ?
2 Answers
+ 1
Looking at your your code I think there is no suntex error, it will work perfectly.
IDK if any there better way or optimization otherwise it right.
+ 1
greate thank you đ€