Programas De c++

Páginas: 3 (611 palabras) Publicado: 31 de agosto de 2011
2.- CODIFICAR UN PROGRAMA QUE PERMITA A UNA EMPRESA DETERMINAR EL TOTAL DE SUS VENTAS DIARIAS
#include <iostream.h>
class ventas
{
public:
void calcular (void)
{ inti=0;
int b;
double c;
double d;
cout<<"¿cuantos montos vas a ingresar?"<<endl;
cin>>b;cout<<endl;
for(i=1; i<=b; i++){
cin>>c;
d=d+c;

}
cout<<endl;cout<<"LA SUMA ES :"<<d;
cout<<endl;
}
};


int main()
{
ventas vent1;
vent1.calcular();
system("PAUSE");
}

3.-CREAR UN PROGRMA QUE UTILIZANDO FUNCIONES PERMITA SUMAR Y MULTIPLICAR LOS MISMOS VALORES
#include <iostream.h>
class prog3{
double sum;
public:
void sumar (doublex, double y){

sum=x+y;

cout<<x<<" + "<<y<<" = "<<sum;
cout<<endl;void multi (double y, double w){

sum=y*w;
cout<<y<<" x "<<w<<" = "<<sum;cout<<endl;

}

};


int main(){
double a,b;
cout<<"ingresa el primer numero ";cin>>a;
cout<<endl;

cout<<"ingresa el segundo numero ";
cin>>b;
cout<<endl;prog3 prog;
prog.sumar(a,b);
prog.multi(a,b);
cout<<endl;
system("PAUSE");
}

6.- PROGRAMA QUE INCLUYA UN CLASE QUE...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Programa c#
  • PROGRAMAR EN C
  • C++ Programas De C++
  • Programas en c++
  • programa en c++
  • Programas c#
  • programas en c
  • Programas en c

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS