<!--HTML5(020)<code>顯示原始碼</code>-->
<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title>HTML5(020)<code>顯示原始碼</code></title>
</head>
<header>
    <h1>C語言</h1>
</header>
<body>
    <p>if else的使用</p>
<pre>
<code>
    #include<stdio.h>
    #include<stdlib.h>
    
    int main(void)
    {
        int i = 1;
        
        if(i == 1)
            printf("i love programing\n");
        else
            printf("still love\n");
        
        system("pause");
        return 0;
    }
</code>
</pre>
    <p>if=如果i = 1</p>
    <p>印出i love programing</p>
    <p>else=如果不是</p>
    <p>印出還是愛</p>
</body>
</html>

 

結果為:

image

arrow
arrow
    創作者介紹
    創作者 愛學習 的頭像
    愛學習

    愛學習

    愛學習 發表在 痞客邦 留言(0) 人氣()