ClubEnsayos.com - Ensayos de Calidad, Tareas y Monografias
Buscar

Resumen De Español Para Bachillerato


Enviado por   •  27 de Junio de 2012  •  525 Palabras (3 Páginas)  •  2.889 Visitas

Página 1 de 3

Programación---------- Ejemplos básicos de C++ ----------

/* programa SUMA DOS VALORES */

#include <iostream.h>

#include <stdlib.h>

#include <stdio.h>

#include <conio.h>

#include <string.h>

main()

{

float a,b,c;

clrscr; /*Limpia la pantalla*/

printf("\n ESTE ES MI PRIMER PROGRAMA");

printf("\n\nDigite el primer valor: ");

scanf("%f",&a);

printf("\nDigite el segundo valor: ");

scanf("%f",&b);

c=a+b;

printf("\nEl total de %f y %f es: %20.2f ",a,b,c);

printf("\n\n\n\n");

system("PAUSE");

return 0;

//getche(); /* programa AREA TRIANGULO */

/* C306.C */

# include <stdio.h>

void main()

{

/* Declaraciones */

/* Variables */

float Area,Base,Altura;

/* Instrucciones ejecutables */

printf("\nCALCULA EL AREA DE UN TRIANGULO\n\n");

printf("-------------------------------\n");

printf("DIGITE LA BASE: ");

scanf("%f",&Base);

printf("DIGITE LA ALTURA: ");

scanf("%f",&Altura);

Area = Base*Altura/2;

printf("-------------------------------\n\n");

printf("EL AREA ES= %-8.2f\n\n",Area);

printf("-------------------------------\n");

printf("PRESIONE <Intro> PARA CONTINUAR...");

fflush(stdin);

getchar();

}/* Fin del programa */

/* programa CALCULO SUELDO DOBLE */

/* C401.C */

# include <stdio.h>

void main()

{

/* Declaraciones */

/* Variables */

char NombreEmp[31];

int HorasTrab;

float CuotaHora,Sueldo;

/* Instrucciones ejecutables */

printf("\nSUELDO DE UN EMPLEADO (HORAS EXTRAS DOBLES)\n\n");

printf("-------------------------------------------\n");

printf("TECLEE EL NOMBRE: ");

gets(NombreEmp);

printf("TECLEE HORAS TRABAJADAS: ");

scanf("%d",&HorasTrab);

printf("TECLEE CUOTA POR HORA: ");

scanf("%f",&CuotaHora);

if (HorasTrab > 40)

Sueldo = (40*CuotaHora) + ((HorasTrab-40)*(CuotaHora* 2));

else

Sueldo = CuotaHora * HorasTrab;

printf("-------------------------------------------\n\n");

printf("EL EMPLEADO : %s \n",NombreEmp);

...

Descargar como (para miembros actualizados) txt (3 Kb)
Leer 2 páginas más »
Disponible sólo en Clubensayos.com