Could someone tell me, if there is any problem with this code? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Could someone tell me, if there is any problem with this code?

https://code.sololearn.com/c5Cuhr9N14fN/?ref=app

20th Oct 2023, 6:36 AM
Abdou-baki Tchakondo
4 Answers
0
That should work, if you test that code for example in the programiz c++ compiler in the link https://www.programiz.com/cpp-programming/online-compiler/ it would get the desired result. This maybe is something to do with the c++ compiler of the sololearn. Don't know. Anyway, just use <iostream> and do cin>>i and cout<<"Say something"<<i. No need to use that kind of libraries in c++.
20th Oct 2023, 2:49 PM
Werg Serium
Werg Serium - avatar
+ 4
Abdou-baki Tchakondo , You wrote your code in C language and used C++ compiler.. And for C language also your declaration of header is wrong... It should be #include<stdio.h> Here The C language code, https://code.sololearn.com/cI1bPi2Cm2Eq/?ref=app Here C++ language code, https://code.sololearn.com/cI6xK9s1283b/?ref=app Go through both the courses to understand it better...
20th Oct 2023, 7:00 AM
Riya
Riya - avatar
+ 1
you wrote c code in c++ compiler that why it not taking input from user
22nd Oct 2023, 6:09 AM
Alhaaz
Alhaaz - avatar
0
Thanks
22nd Oct 2023, 6:22 AM
Abdou-baki Tchakondo