本文共 277 字,大约阅读时间需要 1 分钟。
真的没骗你,这道才是简单题 —— 对任意给定的不超过 10 的正整数 n,要求你输出 2n。不难吧?
输入格式:
输入在一行中给出一个不超过 10 的正整数 n。输出格式:
在一行中按照格式 2^n = 计算结果 输出 2n的值。输入样例:
5 输出样例: 2^5 = 32#include#include int main(){ int n; scanf("%d", &n); printf("2^%d = %.0f", n, pow(2, n)); return 0;}
转载地址:http://qnolf.baihongyu.com/