I tried to compile it without the y-20 in your if statement and I get an error that states:
implicit declaration of function `int gotoxy(...)'
implicit declaration of function `int clrscr(...)'
Type: Posts; User: runtojesus
I tried to compile it without the y-20 in your if statement and I get an error that states:
implicit declaration of function `int gotoxy(...)'
implicit declaration of function `int clrscr(...)'
I have written a little program from an example problem in a book. I am wondering if you guys would look at it and tell me if this is the most efficient way to do this or is there a better way?
...
it's cool... we are all in this together, just trying to be helpful and add a little sarcastic humor to the messages
what is the best way to create exit a program? For example:
This program uses a while loop and then checks the inputed value before it enters it again. Is there a shorter better way to do this?...
Maybe you should try using a program like notepad to learn to read C++ before you put it in an IDE that does the work for you. You just posted your code blindly and it doesn't work as is... sorry...
Leeman_s: I downloaded your code and found a couple of errors. It would not compile so I changed the code to work correctly. Before you brag you might want to make sure the code works:
...
thanks for your help... it works fine now
I am just trying to write a program where a user enters a grade and then when -1 is entered the program outputs the average grade and exits. The code I have written compiles and works, but it...
I am trying to find a better way to do this. I wrote the below code, but it is not working. How can I get this to work? I created an array to hold the values entered from the keyboard. I then...
The code below compiles and runs but it doesn't do what I want it to do. I want it to print each element of the array with 3 spaces in between. Instead, it is printing all five elements received...
int main()
{
int year;
char ans;
ans = y;
while(ans==y)
with this code you have created an endless loop. ans will always equal y in this case. By the way, your syntax should be:
...