はてなブログでのソースコード表示
設定など
[設定] -> [編集モード] -> [はてな記法モード]
[ダッシュボード] -> [記事を書く]
C言語ソーソコードサンプル
#include <stdio.h> int main(void){ int n; char c; printf("hello!!\n"); printf("please enter number : "); scanf("%d",&n); printf("input number is %d \n",n); printf("please enter character : "); scanf("%s",&c); printf("input character is %s \n",&c); return 0; }
ソースコード表現の文法
<!-- スーパーpre記法 --> >|言語名(c,cppなど)| ソースコード ||<