Please point out what's wrong with this code | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Please point out what's wrong with this code

#include <iostream> using namespace std; int main() { float marks[50][3]; int i,j; int num,nom; /*size for row and column*/ cin>>num>>nom; for(i=0;i<num;i++) { for(j=0;j<nom;j++) cin>>marks[i][j]; } for(i=0;i<num;i++) { for(j=0;j<nom;j++) cout<<marks[i][j]; } return 0; }

16th Nov 2016, 12:24 PM
Lavi
Lavi - avatar
5 Answers
+ 4
It's running perfectly There are no errors just give number of inputs correctly for ex 1 2 3 4 and output will be 34
17th Nov 2016, 5:25 PM
Nouman Danish
Nouman Danish - avatar
+ 2
try using <iostream .h> as I don't see other errors anymore
16th Nov 2016, 5:29 PM
Sandeep Chatterjee
+ 1
check your cins and couts
16th Nov 2016, 12:27 PM
Jay
Jay - avatar
+ 1
one should be "<<" the other should be ">>"
16th Nov 2016, 12:27 PM
Jay
Jay - avatar
+ 1
for cout "<<" this cascading sign is used
16th Nov 2016, 12:30 PM
Nilima Purohit
Nilima Purohit - avatar