Visual Studio 2008 P ..
[
2ch
|
▼Menu
]
■コピペモード
□
スレを通常表示
□
オプションモード
□このスレッドのURL
■項目テキスト
32:デフォルトの名無しさん 09/09/03 22:33:02 おいおい、「プログラムを作成するプログラム」を作んなきゃ 33:デフォルトの名無しさん 09/09/03 23:00:50 >>32 了解 Imports System.Diagnostics Imports System.IO Module Module1 Sub Main() Dim sw As StreamWriter sw = File.AppendText("Program.cs") sw.WriteLine("using System;") sw.WriteLine("namespace sosuu {") sw.WriteLine(" class Program {") sw.WriteLine(" static void Main(string[] args) {") sw.WriteLine(" bool[] buf = new bool[10000 + 1];") sw.WriteLine(" for (int i=0; i<buf.Length; i++) buf[i]=true;") sw.WriteLine(" for (int i=2; i<=buf.Length; i++) for (int j=i*2; j<=buf.Length; j+=i) buf[j-1]=false;") sw.WriteLine(" for (int i=1; i<buf.Length; i++) if (buf[i]) Console.Out.WriteLine(i+1);") sw.WriteLine(" }") sw.WriteLine(" }") sw.WriteLine("}") sw.Close() Process.Start("c:\\Windows\\Microsoft.NET\\Framework\\v2.0.50727\\csc.exe /t:exe Program.cs") Dim i As Integer : For i = 1 To 10 : Next Process.Start("Program.exe") End Sub End Module
次ページ
最新レス表示
スレッドの検索
類似スレ一覧
話題のニュース
おまかせリスト
▼オプションを表示
レスジャンプ
mixiチェック!
Twitterに投稿
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch
4821日前に更新/136 KB
担当:undef