miércoles, 1 de mayo de 2013

Funcion Suma C++




 La funcion suma , resta , multiplicacion y division son de las practicas mas solicitadas en laboratorio haciendo un paso por valor . 

#include <iostream.h>
#include <conio.h>

using namespace std;

int suma(int a, int b)
{
int r;
r=a+b;
return (r);   
}

int main ()
{
int a,b,c;
system("cls");
cout<<"\n\n\n         SUMA DE 2 NUMEROS ENTEROS";
cout<<"\n\n Teclee un Numero entero : ";
cin>>a;
cout<<"\n\n Teclee otro Numero entero : ";
cin>>b;
c=suma(a,b);
cout<<"\n\n\n  SUMA:\n\n   "<<a<<"\n + "<<b<<"\n  ------\n   "<<c;
getch();
return 0;
}






1 comentario:

  1. Merkur 37C Safety Razor Review – Merkur 37C
    The Merkur 37c is https://deccasino.com/review/merit-casino/ an excellent short handled DE safety razor. septcasino.com It is more suitable for both heavy and ford fusion titanium non-slip hands and is therefore a 토토 사이트 great option for experienced

    ResponderBorrar