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 ?

27th Oct 2020, 1:29 PM
Rawan
Rawan - avatar
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.
27th Oct 2020, 1:43 PM
0_O-[MĂ€gĂĄr_SĂĄm_ÄkĂ _NĂŒllpÞïntĂȘr_ÈxĂ«cĂ©ptïön]~~
0_O-[MĂ€gĂĄr_SĂĄm_ÄkĂ _NĂŒllpÞïntĂȘr_ÈxĂ«cĂ©ptïön]~~ - avatar
+ 1
greate thank you đŸ€
28th Oct 2020, 7:02 PM
Rawan
Rawan - avatar