[ create a new paste ] login | about

Link: http://codepad.org/fnbhZ0lX    [ raw code | output | fork ]

C++, pasted on Dec 7:
1
2
3
4
5
6
7
8
9
#include<stdio.h>
int main()
{
	int a;
	printf("请输入一个十六进制整数: ");
	scanf("%x",&a);
	printf(" 转换成八进制输出为: %o \n",a);   
    return 0;   
}


Output:
1
2
3
cc1plus: warnings being treated as errors
In function 'int main()':
Line 6: warning: format '%x' expects type 'unsigned int*', but argument 2 has type 'int*'


Create a new paste based on this one


Comments: