Yes, it's displaying the output in reverse order. For 31, the hexadecimal value 1F was displayed as F1.
Thank you very much. :)
Type: Posts; User: Beachblue
Yes, it's displaying the output in reverse order. For 31, the hexadecimal value 1F was displayed as F1.
Thank you very much. :)
I'm sorry. I did use the link, and I understood what gotoxy does, viz., set the cursor position on screen. But the definition didn't help me understand its use in this program, which is why I came to...
OK.. so, does it print the last quotient and the preceding remainders in the reverse order?
Hi, I'm having trouble understanding the use of gotoxy in this program given in my text book. It's for converting a decimal to hexadecimal number using for and switch().
They've used an infinite...
My first recursion program.
Qs: To calculate the sum of digits of a 5 digit number using recursion.
I can do it using functions. But the recursion way is not working. I admit, I did a lot of...
I won't go so far as to call myself a programmer; it's been just a week since I discovered I like C so much, so I'm pretty much the baby over here. But yes, I feel the same way as you do, going back...
Thanks, using float did the trick.
Oh dear... I typed in a return 0, but still I get -124.00000 as the answer... :confused: Why exactly do I need a return 0? I've made programs without it and I've had no problems...
It's really basic. Sorry for posting the whole program, but I have no idea where I've gone wrong.
While executing the bold statement below: If I type 100000 as the policy amount, I get -124 as the...
Oh, all right, then I get it... Thanks!
It's in my book, but unexplained. It reverses a 2-digit number. But I don't get how the operations work....Shouldn't it give zero each time? Could someone please explain what's happening?
...
Right... so is this correct?
#include<stdio.h>
int main(void)
{
int c, d, x;
Here's the question: Two numbers are input through the keyboard into two locations C and D. Write a program to interchange the contents of C and D.
#include<stdio.h>
main()
{
int c,d;
Oops!! Sorry, I will! :eek:
Thank you, mike_g! It works!
Here's the code I used:
#include<stdio.h>
int main()
{
int age;
printf( "Enter your age:\n" );
scanf( "%d", &age );