Created
April 29, 2016 02:37
-
-
Save merlinnusr/f7f609f4638e10dadeb105ceca6be0fb to your computer and use it in GitHub Desktop.
CUCEI TAREA C++
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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