blog/content/post/2008/04/27/2008-04-27-00000895.md

49 lines
2.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: というわけでやってみた
author: kazu634
date: 2008-04-27
wordtwit_post_info:
- 'O:8:"stdClass":13:{s:6:"manual";b:0;s:11:"tweet_times";i:1;s:5:"delay";i:0;s:7:"enabled";i:1;s:10:"separation";s:2:"60";s:7:"version";s:3:"3.7";s:14:"tweet_template";b:0;s:6:"status";i:2;s:6:"result";a:0:{}s:13:"tweet_counter";i:2;s:13:"tweet_log_ids";a:1:{i:0;i:3947;}s:9:"hash_tags";a:0:{}s:8:"accounts";a:1:{i:0;s:7:"kazu634";}}'
categories:
- C
- Programming
---
<div class="section">
<blockquote title="武蔵の日記" cite="http://d.hatena.ne.jp/sirocco634/">
<p>
「ネストがのfor」の練習で、掛け算九九の表を出力するプログラムは、結構いい例題になりませんか
</p>
<p>
<cite><a href="http://d.hatena.ne.jp/sirocco634/" onclick="__gaTracker('send', 'event', 'outbound-article', 'http://d.hatena.ne.jp/sirocco634/', '武蔵の日記');" target="_blank">武蔵の日記</a></cite>
</p>
</blockquote>
<p>
こんな感じかしら?
</p>
<pre class="syntax-highlight">
<span class="synPreProc">#include </span><span class="synConstant">&#60;stdio.h&#62;</span>
<span class="synType">int</span> main(<span class="synType">void</span>);
<span class="synType">int</span> main(<span class="synType">void</span>)
{
<span class="synType">int</span> i, j;
printf (<span class="synConstant">&#34;九九表</span><span class="synSpecial">\n</span><span class="synConstant">&#34;</span>);
<span class="synStatement">for</span> (i = <span class="synConstant">1</span>;i &#60; <span class="synConstant">10</span>;i++) {
printf (<span class="synConstant">&#34;</span><span class="synSpecial">%d</span><span class="synConstant"> の段:</span><span class="synSpecial">\n</span><span class="synConstant">&#34;</span>, i);
<span class="synStatement">for</span> (j = <span class="synConstant">1</span>;j &#60; <span class="synConstant">10</span>;j++) {
printf (<span class="synConstant">&#34;</span><span class="synSpecial">%d</span><span class="synConstant"> * </span><span class="synSpecial">%d</span><span class="synConstant"> = </span><span class="synSpecial">%d</span><span class="synConstant"> &#34;</span>, i, j, i * j);
}
printf (<span class="synConstant">&#34;</span><span class="synSpecial">\n</span><span class="synConstant">&#34;</span>);
}
<span class="synStatement">return</span> (<span class="synConstant"></span>);
}
</pre>
<p>
表示方法をもっと頑張ってみるべきかな?
</p>
</div>