You are on page 1of 1

// a.cpp: archivo de proyecto principal.

#include <stdafx.h>
#include <stdio.h>
#include <conio.h.>
int main ()
{
int A, B, C;
printf("Inserte valor para A: "); scanf("%d",&A);
printf("Inserte valor para B: "); scanf("%d",&B);
printf("Inserte valor para C: "); scanf("%d",&C);
printf("\n%d + %d - %d + 100 = %d",A, B, C, (A+B+C-100));
getch();
}
suma

#include <stdafx.h>
#include <stdio.h>
#include <conio.h.>

int main ()

{
int a,b;
printf ("ingrese el baor de a:");
scanf ("%d",&a);
printf("ingresa el balor de b:");
scanf("%d",&b);
printf("\n%d + %d = %d" ,a,b,(a+b));
getch();

manejo de caracteres

#include <stdafx.h>

#include <stdio.h>

int main()
{
char nombre[12];

gets(nombre);
printf("Hola %s\n", nombre);
scanf("%d",&nombre);
return 0;
}

You might also like