Skip to content

Instantly share code, notes, and snippets.

@merlinnusr
Created April 29, 2016 02:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save merlinnusr/f7f609f4638e10dadeb105ceca6be0fb to your computer and use it in GitHub Desktop.
Save merlinnusr/f7f609f4638e10dadeb105ceca6be0fb to your computer and use it in GitHub Desktop.
CUCEI TAREA C++
#include <iostream> //factorial del numero
#include <conio.h>
#include<stdio.h>
using namespace std;
class Numero{
public:
void hacer();};
void Numero::hacer()
{
int f,n,x;
for (n=2;n<=10;n++)
{
f=1;
for (x=n;x>0;x--)
{
f=f*x;
}
cout<<"\nEl factorial de :"<<n<<"es :"<<f;
}
}
main ()
{
Numero objeto ;
objeto.hacer ();
getch();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment