+ 5
How should i accept inputs in the following program?
help pls:-) https://code.sololearn.com/cm14swVMJ8yi/?ref=app
8 Antworten
+ 3
The logic is good. It works if you correct the following syntax errors:
- Extraneous opening brace after long int variable declaration in main()
- Extraneous semicolon after for() statement in main()
- Wrong array name a[] used instead of b[] in for() loop in searchnum()
- Extraneous closing brace after return i; in searchnum()
- Warnings about misleading indentation
To test, I entered values in the following way:
2
3 5
5
The result correctly stated:
5 is present at location 1.
+ 1
anyone who can answer !:-)
+ 1
What do you mean?
Your program doesn't work because there are a bunch of stray characters instead of spaces all over your program ( may not be visible on the mobile version ).
+ 1
oh ,yea they aren't available on mobile ,thks I will write it again
+ 1
I'll check when I get home :)
+ 1
ok thks
+ 1
thks Brian
0
now see it ,still two errors