本人不太懂编程之类的,现在要写一个小程序,不知道怎么用八进制数对整型变量赋值,并且将其翻倍输出。
你输入八进制?输出要几进制呢?
#include <stdio.h> #include <stdlib.h> int main() { int n; scanf("%o",&n); n*=2; printf("%o",n); return 0; }