专注各种脚本编程
Baidu
加入收藏夹
本站内容有下面分类知识,欢迎您的到来^_^
shell相关:指令篇 基础篇 脚本欣赏 编程实例 shell问问 shell视频教程 技巧篇 水平测试 E文资料 vi编辑器 高级Bash脚本编程指南
其他:mysql perl c语言 oracle
当前位置:| 主页>c语言教程>

46.宏#define命令练习(1)-经典C语言程序设计100例

百度收藏 QQ搜藏
【程序46】
题目:宏#define命令练习(1)   
1.程序分析:
2.程序源代码:
#include "stdio.h"
#define TRUE 1
#define FALSE 0
#define SQ(x) (x)*(x)
void main()
{
int num;
int again=1;
printf("\40: Program will stop if input value less than 50.\n");
while(again)
{
printf("\40:Please input number==>");
scanf("%d",&num);
printf("\40:The square for this number is %d \n",SQ(num));
if(num>=50)
  again=TRUE;
else
  again=FALSE;
}
}
上一篇:45.使用register定义变量方法-经典C语言程序设计100例 下一篇:47.宏#define命令练习(2)-经典C语言程序设计100例

power by soyo123 2007-2008