C Primer Plus2-5

来源:互联网 发布:win7网络上有红叉 编辑:程序博客网 时间:2024/06/07 00:30
/*2-5.编写一个程序,创建一个名为 toes 的整数变量。让程序把 toes 设置为 10。再让程序计算两个toes 的和以及 toes 的平方。程序应该输出所有的 3 个值,并分别标识它们。*/#include <stdio.h>int main(){    int toes;    toes = 10;    printf("toes:%d\n", toes);    printf("toes_add:%d\n", toes * 2);    printf("toes_square:%d\n", toes * toes);    system("pause");    return 0;}

这里写图片描述

0 0
原创粉丝点击