Hi guys. Hope all is well.
There's another concern too.
If one is to write a code in which a number would be changed into its binary equivalent, and the binary equivalent would be printed, how does one untie this knot?
#include<stdio.h>
main()
{
int n; /* the number */
int b; /* the binary part */
printf(" Enter a number,plz :");
scanf("%d", &n);
b= m%2 /* this is the operation required */
while( b!= 0) /* this is the part where things */
{ /* become wozzy */
The loop has to continue until the b==0. How do I have the b @ every loop recorded for the final output? Or do I have to include this in the loop :
b = b%2 . I think I can include that in the loop (now that I think of it). But I still can't figure out a way to print all the b's @ every stage of the loop after the loop has ended.
Plz, do not give me the code. Just point me in the right direction.
Thx for the input.