PCが重いだけでしょうか?
ついでなんですがコンパイラとMicrosoft Visual C++ 2010 Expressみたいなソフトを作るには何言語で作れるか教えてください。
#pragma once
int a [10];
int b[10][10];
int c[10][10];
namespace d {
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
/// <summary>
/// Form1 の概要
/// </summary>
public ref class Form1 : public System::Windows::Forms::Form
{
public:
Form1(void)
{
InitializeComponent();
//
//TODO: ここにコンストラクター コードを追加します
//
}
protected:
/// <summary>
/// 使用中のリソースをすべてクリーンアップします。
/// </summary>
~Form1()
{
if (components)
{
delete components;
}
}
private: System::Windows::Forms::Button^ button1;
protected:
private: System::Windows::Forms::Label^ label1;
private: System::Windows::Forms::Label^ label2;
private: System::Windows::Forms::Label^ label3;
private: System::Windows::Forms::Label^ label4;
private: System::Windows::Forms::Label^ label5;
private: System::Windows::Forms::Label^ label6;
private: System::Windows::Forms::Label^ label7;
private:
/// <summary>
/// 必要なデザイナー変数です。
/// </summary>
System::ComponentModel::Container ^components;
#pragma region Windows Form Designer generated code
/// <summary>
/// デザイナー サポートに必要なメソッドです。このメソッドの内容を
/// コード エディターで変更しないでください。
/// </summary>
void InitializeComponent(void)
{
this->button1 = (gcnew System::Windows::Forms::Button());
this->label1 = (gcnew System::Windows::Forms::Label());
this->label2 = (gcnew System::Windows::Forms::Label());
this->label3 = (gcnew System::Windows::Forms::Label());
this->label4 = (gcnew System::Windows::Forms::Label());
this->label5 = (gcnew System::Windows::Forms::Label());
this->label6 = (gcnew System::Windows::Forms::Label());
this->label7 = (gcnew System::Windows::Forms::Label());
this->SuspendLayout();
//
// button1
//
this->button1->Font = (gcnew System::Drawing::Font(L"MS UI Gothic", 18, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(128)));
this->button1->Location = System::Drawing::Point(12, 12);
this->button1->Name = L"button1";
this->button1->Size = System::Drawing::Size(81, 36);
this->button1->TabIndex = 0;
this->button1->Text = L"実行";
this->button1->UseVisualStyleBackColor = true;
this->button1->Click += gcnew System::EventHandler(this, &Form1::button1_Click);
//
// label1
//
this->label1->AutoSize = true;
this->label1->Font = (gcnew System::Drawing::Font(L"MS UI Gothic", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(128)));
this->label1->Location = System::Drawing::Point(22, 73);
this->label1->Name = L"label1";
this->label1->Size = System::Drawing::Size(52, 16);
this->label1->TabIndex = 1;
this->label1->Text = L"label1";
//
// label2
//
this->label2->AutoSize = true;
this->label2->Font = (gcnew System::Drawing::Font(L"MS UI Gothic", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(128)));
this->label2->Location = System::Drawing::Point(156, 25);
this->label2->Name = L"label2";
this->label2->Size = System::Drawing::Size(52, 16);
this->label2->TabIndex = 2;
this->label2->Text = L"label2";
//
// label3
//
this->label3->AutoSize = true;
this->label3->Font = (gcnew System::Drawing::Font(L"MS UI Gothic", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(128)));
this->label3->Location = System::Drawing::Point(300, 25);
this->label3->Name = L"label3";
this->label3->Size = System::Drawing::Size(52, 16);
this->label3->TabIndex = 3;
this->label3->Text = L"label3";
//
// label4
//
this->label4->AutoSize = true;
this->label4->Font = (gcnew System::Drawing::Font(L"MS UI Gothic", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(128)));
this->label4->Location = System::Drawing::Point(156, 176);
this->label4->Name = L"label4";
this->label4->Size = System::Drawing::Size(52, 16);
this->label4->TabIndex = 4;
this->label4->Text = L"label4";
//
// label5
//
this->label5->AutoSize = true;
this->label5->Font = (gcnew System::Drawing::Font(L"MS UI Gothic", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(128)));
this->label5->Location = System::Drawing::Point(300, 176);
this->label5->Name = L"label5";
this->label5->Size = System::Drawing::Size(52, 16);
this->label5->TabIndex = 5;
this->label5->Text = L"label5";
//
// label6
//
this->label6->AutoSize = true;
this->label6->Font = (gcnew System::Drawing::Font(L"MS UI Gothic", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(128)));
this->label6->Location = System::Drawing::Point(156, 221);
this->label6->Name = L"label6";
this->label6->Size = System::Drawing::Size(52, 16);
this->label6->TabIndex = 6;
this->label6->Text = L"label6";
//
// label7
//
this->label7->AutoSize = true;
this->label7->Font = (gcnew System::Drawing::Font(L"MS UI Gothic", 12, System::Drawing::FontStyle::Bold, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(128)));
this->label7->Location = System::Drawing::Point(300, 221);
this->label7->Name = L"label7";
this->label7->Size = System::Drawing::Size(52, 16);
this->label7->TabIndex = 7;
this->label7->Text = L"label7";
//
// Form1
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 12);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->ClientSize = System::Drawing::Size(471, 460);
this->Controls->Add(this->label7);
this->Controls->Add(this->label6);
this->Controls->Add(this->label5);
this->Controls->Add(this->label4);
this->Controls->Add(this->label3);
this->Controls->Add(this->label2);
this->Controls->Add(this->label1);
this->Controls->Add(this->button1);
this->Name = L"Form1";
this->Text = L"Form1";
this->ResumeLayout(false);
this->PerformLayout();
}
#pragma endregion
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
int i;
int j;
String^w="";
for(i=0;i<10;i++){
a[i]=i;
}
for(i=0;i<10;i++){
w=w+L" "+a[i].ToString();
}
label1->Text=w;
w=L"";
for(i=0;i<4;i++){
for(j=0;j<4;j++){
b[i][j]=4*i+j+5;
}
}
for(i=0;i<4;i++){
for(j=0;j<4;j++){
if(b[i][j]<10){
w=w+L"0"+b[i][j].ToString()+L" ";
}
else{
w=w+b[i][j].ToString()+L" ";
}
}
w=w+L"\n";
}
label2->Text=w;
w=L"";
for(i=0;i<4;i++){
for(j=0;j<4;j++){
c[i][j]=4*i+j;
}
}
for(i=0;i<4;j++){
for(j=0;j<4;j++){
if(c[i][j]<10){
w=w+L"0"+c[i][j].ToString()+L" ";
}
else{
w=w+c[i][j].ToString()+L" ";
}
}
w=w+L"\n";
}
label3->Text=w;
label4->Text=L"和";
label5->Text=L"差";
w=L"";
for(i=0;i<4;i++){
for(j=0;j<4;j++){
if(b[i][j]+c[i][j]<10){
w=w+L"0"+(b[i][j]+c[i][j]).ToString()+L" ";
}
else{
w=w+(b[i][j]+c[i][j]).ToString()+L" ";
}
}
w=w+L"\n";
}
label6->Text=w;
w=L"";
for(i=0;i<4;i++){
for(j=0;j<4;j++){
if(b[i][j]-c[i][j]<10){
w=w+L"0"+(b[i][j]-c[i][j]).ToString()+L" ";
}
else{
w=w+(b[i][j]-c[i][j]).ToString()+L" ";
}
}
w=w+L"\n";
}
label7->Text=w;
}
};
}