+ 1
I m unable to use clrscr ( )..in this code. It's showing garbage value when I enter the value of cp nd sp.
7 ответов
+ 2
clrscr() is a part of conio.h which is a non-standard and deprecated header.
+ 2
You can't clear the screen in Sololearn.
For *nix systems: printf("\033[2J");
For Windows: I can't think of a time that'd be useful since you're generally not doing command-line programs. If you must use system("cls") or for(i=0; i < 100; ++i) printf("\n");
Note: C doesn't understand the concept of a screen, all it knows is data streams (FILEs, stdin, stdout and stderr), which is why there's no standard way of doing it.
+ 2
I think Sololearn's Code Playground is based on Windows, so the conio.h header might exist and not work properly.
+ 1
Wat should I do nw..should I include dt header file.? or is there any other way?
+ 1
then sir y it's showing garbage value that is the actual prblm ?...nd I want to sort out dt...it's output is true it's just nt showing the entered value of cp nd sp.
+ 1
ok...I will try another type of problem .....bt thnx fr ur help sir.