Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- using namespace std;
- //Declaracion de funcion
- bool multiplo (int num1, int num2);
- int main(){
- int priNum, seNum, resultado;
- cout<<"ingrese el primer numero: ";
- cin>>priNum;
- cout<<"ingrese el segundo numero: ";
- cin>>seNum;
- if(multiplo(priNum, seNum)){
- cout<<"verdadero";
- }else{
- cout<<"falso";
- }
- cout<<endl;
- system("pause");
- return 0;
- }
- //Defenicion de la funcion
- bool multiplo(int num1, int num2){
- if (num2%num1==0){
- return true;
- }else{
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment