#include <stdio.h> #include <conio.h> void main() { clrscr(); int A, B, C; A=5; if(A>5) { }printf ("\n A is greater than | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 5

#include <stdio.h> #include <conio.h> void main() { clrscr(); int A, B, C; A=5; if(A>5) { }printf ("\n A is greater than

Why is this not run

24th Nov 2020, 12:36 PM
sumit dubey
sumit dubey - avatar
36 Answers
+ 12
This is not running because you are using stuff that doesn't exist in c/c++ anymore. I am talking about <conio.h>,clrscr(),(I can't see it but there would be a getch() in the end). These are the things which have been removed from standards long time ago.
24th Nov 2020, 12:40 PM
Arsenic
Arsenic - avatar
+ 5
You must be using a non standard IDE like "turbo" on your system. First of all change it to something more morden. Then take remove all the useless stuff from the code {ones mentioned in previous answer}
24th Nov 2020, 12:44 PM
Arsenic
Arsenic - avatar
+ 5
You need to learn how to do it.. See I just copied total answer and sharing it with a code link.. Did you see any difference..? https://code.sololearn.com/c74j6lLMKGau/?ref=app
24th Nov 2020, 1:23 PM
Jayakrishna 🇮🇳
+ 4
You're welcome.. Try to understand clearly and do your own what is suggested.. You get quick helps.. Happy learning..
24th Nov 2020, 1:27 PM
Jayakrishna 🇮🇳
+ 3
sumit dubey This shows you how to share links: https://www.sololearn.com/post/75089/?ref=app This shows you how share button looks.. https://www.sololearn.com/post/74857/?ref=app You have already saved 2 codes so they have share button from that copy code link and paste it here in your reply...
24th Nov 2020, 1:08 PM
Jayakrishna 🇮🇳
+ 3
#include <stdio.h> //#include <conio.h> //this is deprecated, dont work here int main() //add int main here { //clrscr(); //this is alsi not work here int A; A=5; if(A>5) { printf ("\n A is greater than 5"); //you added this out of if. Add in if like this.. } else printf ("\n A is not greater than 5"); // getch (); //this also dont work, you can use getchar() instead but no need here sumit dubey copy it and see by running return 0; }
24th Nov 2020, 1:12 PM
Jayakrishna 🇮🇳
+ 2
sumit dubey your code is incomplete or truncated. Save code in playground and share link here... You can get quick help then...
24th Nov 2020, 1:00 PM
Jayakrishna 🇮🇳
+ 2
Just copy total previous answer and paste in playground. Run it and see.. I corrected code and added comments what need there.. I added explanation clearly.. No need of any changes for that in my reply.. So just copy and paste it empty playground file and run code.. sumit dubey
24th Nov 2020, 1:18 PM
Jayakrishna 🇮🇳
+ 2
Sry Am not activated my account so can't reply via DM. It don't work for me.. You can ask here or add the above code comments, about any other code help..
24th Nov 2020, 1:33 PM
Jayakrishna 🇮🇳
+ 2
at the end 1 ..}.. Missing
25th Nov 2020, 1:35 AM
asmita mundhe
+ 2
Indentation are not correct
25th Nov 2020, 3:17 AM
Vishal Pandey
0
How will it run then Please
24th Nov 2020, 12:42 PM
sumit dubey
sumit dubey - avatar
0
Please guide me
24th Nov 2020, 12:43 PM
sumit dubey
sumit dubey - avatar
0
But I want to do this in my Android phone, I do not have the system, please tell me any solution please Arsenic
24th Nov 2020, 12:48 PM
sumit dubey
sumit dubey - avatar
0
I am Bignner so I need your help
24th Nov 2020, 12:48 PM
sumit dubey
sumit dubey - avatar
0
But how jaya krishna
24th Nov 2020, 1:04 PM
sumit dubey
sumit dubey - avatar
24th Nov 2020, 1:08 PM
sumit dubey
sumit dubey - avatar
0
https://code.sololearn.com/cNL1QU0M7Iex/?ref=app
24th Nov 2020, 1:09 PM
sumit dubey
sumit dubey - avatar
0
I have sent the link, please tell me now jaya krishna
24th Nov 2020, 1:11 PM
sumit dubey
sumit dubey - avatar
0
If you make the correct one wrong from my link then maybe I understand please
24th Nov 2020, 1:14 PM
sumit dubey
sumit dubey - avatar