[閒聊] if 用法

看板FJU-Stat97A作者 (鮮橙柚)時間16年前 (2009/10/22 15:17), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
#include <stdio.h> #include <stdlib.h> int main(void) { int age; printf("請輸入整數(年齡) :>"); scanf("%d",&age); if(age<10) { printf("小朋友!\n"); } if((age<=30)&&(age>10)) { printf("年輕人!\n"); } if((age<=50)&&(age>30)) { printf("中年人!\n"); } system("pause"); return(0); } -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.136.162.153
文章代碼(AID): #1Au0S1PL (FJU-Stat97A)