Realizar una aplicación como la que se muestra en el vídeo adjunto.
En la pestaña lenguajes es suficiente con dos lenguajes.
Blog del curso de Programación de Aplicaciones informáticas, que se imparte en el Multicentro Torneiros en Porriño.
Se imparte programación en lotes en MSDOS, SQL, Clipper, y lenguaje C, C++ y Visual Basic.
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { int dato_teclado=1234, unidades=0, decenas=0, centenas=0, millares=0; dato_teclado = Convert::ToInt32(this->textBox1->Text); millares=dato_teclado / 1000; dato_teclado = dato_teclado % 1000; centenas=dato_teclado / 100; dato_teclado = dato_teclado % 100; decenas=dato_teclado / 10; unidades = dato_teclado % 10; this->textBox2->Text = ""; switch (millares) { case 1: this->textBox2->Text += "M"; break; case 2: this->textBox2->Text += "MM"; break; default: break; } switch (centenas) { case 1: this->textBox2->Text += "C"; break; case 2: this->textBox2->Text += "CC"; break; case 3: this->textBox2->Text += "CCC"; break; case 4: this->textBox2->Text += "CD"; break; case 5: this->textBox2->Text += "D"; break; case 6: this->textBox2->Text += "DC"; break; case 7: this->textBox2->Text += "DCC"; break; case 8: this->textBox2->Text += "DCCC"; break; case 9: this->textBox2->Text += "CM"; break; default: break; } switch (decenas) { case 1: this->textBox2->Text += "X"; break; case 2: this->textBox2->Text += "XX"; break; case 3: this->textBox2->Text += "XXX"; break; case 4: this->textBox2->Text += "XL"; break; case 5: this->textBox2->Text += "L"; break; case 6: this->textBox2->Text += "LX"; break; case 7: this->textBox2->Text += "LXX"; break; case 8: this->textBox2->Text += "LXX"; break; case 9: this->textBox2->Text += "XC"; break; default: break; } switch (unidades) { case 1: this->textBox2->Text +="I"; break; case 2: this->textBox2->Text +="II"; break; case 3: this->textBox2->Text +="III"; break; case 4: this->textBox2->Text +="IV"; break; case 5: this->textBox2->Text +="V"; break; case 6: this->textBox2->Text +="VI"; break; case 7: this->textBox2->Text +="VII"; break; case 8: this->textBox2->Text +="VIII"; break; case 9: this->textBox2->Text +="IX"; break; default: break; } }
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { bool es_primo = true; int dato_teclado; dato_teclado = Convert::ToInt32 (this->txt_dato->Text); for (int i = dato_teclado-1; i>1; i--) { if ((dato_teclado % i) == 0) { es_primo = false; } } if (es_primo) this->et_primo->Text = "VERDADERO"; else this->et_primo->Text = "FALSO"; }
private: System::Void bt_numeros_Click(System::Object^ sender, System::EventArgs^ e) { int v_inicial=1, v_final=100, v_salto=1; v_inicial = Convert::ToInt32 (this->tb_valor_inicial->Text); v_final = Convert::ToInt32 (this->tb_valor_final->Text); v_salto = Convert::ToInt32 (this->tb_salto->Text); this->tb_pares->Text = ""; for (int i = v_inicial; i <= v_final; i+= v_salto) { this->tb_numeros->Text += Convert::ToString(i); this->tb_numeros->Text += "\r\n"; }}
}
private: System::Void bt_numeros_Click(System::Object^ sender, System::EventArgs^ e) { for (int i = 1; i <= 100; i++) { this->tb_numeros->Text += Convert::ToString(i); this->tb_numeros->Text += "\r\n"; } }