Visual C++

Páginas: 3 (675 palabras) Publicado: 3 de julio de 2012
1).-Un Formulario para ingresar 7 edades a un vector .Al ingresar los 7, se deberá deshabilitar el botón Ingresar

int x[10],i=0; . . . #pragma endregion private: System::Voidbutton1_Click(System::Object^

sender, System::EventArgs^

e) {

x[i]=Int32::Parse(textBox1->Text); textBox1->Text=""; textBox1->Focus(); if(i==6) { button1->Enabled=false; button2->Focus(); } i++; } private:System::Void button2_Click(System::Object^ sender, System::EventArgs^ { listBox1->Items->Add("Mostrando"); listBox1->Items->Add(" Datos: "); for(int j=0; jItems->Add( j+1 + ").- " + x[j]); }button3->Focus(); } private: System::Void button3_Click(System::Object^ sender, System::EventArgs^ { Application::Exit(); } e)

e)

private: System::Void textBox1_KeyDown(System::Object^ sender,System::Windows::Forms::KeyEventArgs^ e) { if(e->KeyCode == System::Windows::Forms::Keys::Enter){ button1->Focus(); } } };

2).- Un formularios para ingresar 7 números a un vector .Mostrar el totalde pares e impares

int x[7],i=0,p=0,m=0; . . . . } #pragma endregion private: System::Void button1_Click(System::Object^ senderSystem::EventArgs^ e) { x[i]=Int32::Parse(textBox1->Text);listBox1->Items->Add(x[i]); textBox1->Focus(); textBox1->Text=""; if(i==6) { button1->Enabled=false; button3->Focus(); } i++; } private: System::Void button2_Click(System::Object^ sender,System::EventArgs^ e) { i=0; p=0; m=0; listBox1->Items->Clear(); listBox2->Items->Clear(); listBox3->Items->Clear(); button1->Focus(); textBox2->Text=""; textBox3->Text=""; button1->Enabled=true; textBox1->Focus();} private: System::Void button3_Click(System::Object^ { sender, System::EventArgs^ e)

for(int j=0;j0) { if(x[j]%2==0) { listBox2->Items->Add(x[j]); p++; } else { listBox3->Items->Add(x[j]);m++; } } } textBox2->Text=m.ToString(); textBox3->Text=p.ToString(); } private: System::Void button4_Click(System::Object^ sender, System::EventArgs^ { Application::Exit(); } private: System::Void...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Visual C++
  • Tutorial de Programación Visual C++
  • Codigo Detest Visual C#
  • Lenguaje Visual C++
  • Programas en visual c++
  • Access y visual c++6.0
  • tecnologias visual c#
  • estilos visuales C

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS