c+++( 整数转换 2进制 详细 介绍)
#include<stdio.h>
#include<stdlib.h>
#include <windows.h>
#include <time.h>
#include <conio.h>
/*LIU GUOHUA 20165281 /
/15-10-20 14:39/
/ Contents: integer is converted to 2 hexadecimal representation */
/Function: after 2 hexadecimal integer transform expression if they give up continue to run 100 ms to run programs automatically shut down8/
void binary_system();
void Exit_the_program();
int main()
{
char ans=‘y’;
while(ans!='n')
{
binary_system();
Sleep(100); // binary_system() run 100 ms after Exit_the_program will run.
Exit_the_program();
ans=getch();
}
return 0;
}
void binary_system() integer chenge to 2 base + Asked whether to continue
{
char answer; /// To choose p