常量變數以及迴圈

2021-08-11 07:10:16 字數 603 閱讀 8842

常量

1.三目運算詞

三字母詞

表達字元

???(

[??)

]??<

2.迴圈

1).陣列元素以及變數在記憶體中的分配順序

2)goto語句應用

//電腦關機程式

#include

#include

#include

#include

int main()

; flag:

system("shutdown -s -t 60");

printf("電腦將在1分鐘關機,如果輸入我是豬,就取消關機\n");

scanf("%s", input);

if (0 == (strcmp(input, "我是豬")))

else

return

0;}

3)break,continue在迴圈中作用

break直接跳出迴圈,continue跳出本次迴圈執行下次迴圈

20150527常量變數

main.c ios150527 created by peng junlong on 15 5 27.include void changliangbian int main int argc,const char argv 常量 變數 常量 是c語言中最基本的元素,包括 字元常量,整型常量,浮點...

Swift 常量變數

main.swift swift 常量變數 created by dingkang on 15 12 15.import foundation 常量 在程式執行期間,不可以改變的量,稱之為常量。變數 在程式執行過程中,其值可以任意改變的量稱之為變數。變數和常量一樣,在使用之前都要進行生宣告和自定義 ...

02 常量 變數

變數常量 在程式的執行過程中其值不發生改變的量。之後,通過字首區分不同進製的資料 system.out.println 0b100 二進位制 以0b開頭 system.out.println 0100 八進位制 以0b開頭 system.out.println 100 十進位制 整數預設是十進位制的...