Resumen De Español Para Bachillerato
Enviado por karcris • 27 de Junio de 2012 • 525 Palabras (3 Páginas) • 2.885 Visitas
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
...