SlideShare a Scribd company logo
1 of 3
#include "stdafx.h"
#include <math.h>
using namespace System;
#include<iostream>
using std::cout;
using std::cin;
using std::endl;
int ingreso();
int comparacion(double,double,double);
int par(int,char,double,double,double);
void salida(double,double,double,double);
int pa,n1,n2,n3,menor;
char g;

int main(array<System::String ^> ^args)
{
      cout<<"tmenor de tres numerosn";
      ingreso();
      comparacion(n1,n2,n3);
      par(pa,g,n1,n2,n3);
      salida(n1,n2,n3,menor);
      Console::Read();
    return 0;
}
int ingreso()
{
      cout<<"nIngrese un numero :n";
      cin>>n1;
      cout<<"nIngrese otro numero :n";
      cin>>n2;
      cout<<"nIngrese otro numero :n";
      cin>>n3;
      return n1,n2,n3;
}
int comparacion(double a,double b,double c)
{
      if(a<b)
      {
            if(b<c)
            {
            menor=a;
            }
      }
      else
      {
            if(a<c)
            {
                  if(c<b)
                  {
                  menor=a;
                  }
            }
      }
      if(b<c)
      {
            if(c<a)
            {
menor=b;
            }
     }
     else
     {
            if(b<a)
            {
                  if(a<c)
                  {
                  menor=b;
                  }
            }
     }
     if(c<b)
     {
           if(b<a)
           {
           menor=a;
           }
     }
     else
     {
           if(c<a)
           {
                 if(a<b)
                 {
                 menor=a;
                 }
           }
     }
     if (a==b)
     {
           if(b==c)
           {
           cout<<"n los numeros son iguales";
           }
     }


      return menor;
}
int par(double pa,char g,double n1,double n2,double n3)
{

pa=fmod(n1,2);
if(pa==0)
{
      g="par";
}
}
void salida(double n1,double n2,double n3,double me,char g)
{
      cout<<"nNumeros ingresados :"<<n1<<" "<<n2<<" "<<n3;
      if (menor==0)
      {

     cout<<"igales="<<n1;
}
    else
    {
    cout<<"ntMenor ="<<me;
    }
}

More Related Content

What's hot

Yohan jacobi gaussseidel_analisis
Yohan jacobi gaussseidel_analisisYohan jacobi gaussseidel_analisis
Yohan jacobi gaussseidel_analisisYohan Sidik
 
Program Pascal Regresi Linier Sederhana
Program Pascal Regresi Linier SederhanaProgram Pascal Regresi Linier Sederhana
Program Pascal Regresi Linier Sederhanawidyaazizatin
 
Absolute Loader
Absolute LoaderAbsolute Loader
Absolute Loaderksanthosh
 
Python codigo graficas
Python codigo graficasPython codigo graficas
Python codigo graficasBrayan Kalaka
 
Bcsl 033 data and file structures lab s1-2
Bcsl 033 data and file structures lab s1-2Bcsl 033 data and file structures lab s1-2
Bcsl 033 data and file structures lab s1-2Dr. Loganathan R
 
Spreadspectrum matlab code
Spreadspectrum matlab codeSpreadspectrum matlab code
Spreadspectrum matlab codeGanesh Mandakapu
 
[KOSSA] C++ Programming - 14th Study - template
[KOSSA] C++ Programming - 14th Study - template[KOSSA] C++ Programming - 14th Study - template
[KOSSA] C++ Programming - 14th Study - templateSeok-joon Yun
 
Pruebabfs
PruebabfsPruebabfs
PruebabfsJorge
 
Tugas kelompok 3.2
Tugas kelompok 3.2Tugas kelompok 3.2
Tugas kelompok 3.21300018075
 
Функциональное реактивное программирование
Функциональное реактивное программированиеФункциональное реактивное программирование
Функциональное реактивное программированиеDmitriy Kiriyenko
 

What's hot (16)

Program 'prosedur' pascal
Program 'prosedur' pascalProgram 'prosedur' pascal
Program 'prosedur' pascal
 
Yohan jacobi gaussseidel_analisis
Yohan jacobi gaussseidel_analisisYohan jacobi gaussseidel_analisis
Yohan jacobi gaussseidel_analisis
 
Program Pascal Regresi Linier Sederhana
Program Pascal Regresi Linier SederhanaProgram Pascal Regresi Linier Sederhana
Program Pascal Regresi Linier Sederhana
 
Absolute Loader
Absolute LoaderAbsolute Loader
Absolute Loader
 
Pilas
PilasPilas
Pilas
 
Python codigo graficas
Python codigo graficasPython codigo graficas
Python codigo graficas
 
Vcs6
Vcs6Vcs6
Vcs6
 
Bcsl 033 data and file structures lab s1-2
Bcsl 033 data and file structures lab s1-2Bcsl 033 data and file structures lab s1-2
Bcsl 033 data and file structures lab s1-2
 
Spreadspectrum matlab code
Spreadspectrum matlab codeSpreadspectrum matlab code
Spreadspectrum matlab code
 
Fcfs Cpu Scheduling With Gantt Chart
Fcfs Cpu Scheduling With Gantt ChartFcfs Cpu Scheduling With Gantt Chart
Fcfs Cpu Scheduling With Gantt Chart
 
Info clasa
Info clasaInfo clasa
Info clasa
 
[KOSSA] C++ Programming - 14th Study - template
[KOSSA] C++ Programming - 14th Study - template[KOSSA] C++ Programming - 14th Study - template
[KOSSA] C++ Programming - 14th Study - template
 
Pruebabfs
PruebabfsPruebabfs
Pruebabfs
 
Tugas kelompok 3.2
Tugas kelompok 3.2Tugas kelompok 3.2
Tugas kelompok 3.2
 
MFC Text app
MFC Text appMFC Text app
MFC Text app
 
Функциональное реактивное программирование
Функциональное реактивное программированиеФункциональное реактивное программирование
Функциональное реактивное программирование
 

Viewers also liked

110515 0445 Tops
110515 0445 Tops110515 0445 Tops
110515 0445 Topseboroil
 
EVOLUTION OF STRUCTURE OF SOME BINARY GROUP-BASED N-BIT COMPARATOR, N-TO-2N D...
EVOLUTION OF STRUCTURE OF SOME BINARY GROUP-BASED N-BIT COMPARATOR, N-TO-2N D...EVOLUTION OF STRUCTURE OF SOME BINARY GROUP-BASED N-BIT COMPARATOR, N-TO-2N D...
EVOLUTION OF STRUCTURE OF SOME BINARY GROUP-BASED N-BIT COMPARATOR, N-TO-2N D...VIT-AP University
 
120625 0814 Tops
120625 0814 Tops120625 0814 Tops
120625 0814 Topseboroil
 
Us Presentation En
Us Presentation EnUs Presentation En
Us Presentation EnMichaelHiess
 
080202 Prev Projects
080202 Prev Projects080202 Prev Projects
080202 Prev Projectseboroil
 
Elucidating Digital deception: Spot counterfeit fragment
Elucidating Digital deception: Spot counterfeit fragmentElucidating Digital deception: Spot counterfeit fragment
Elucidating Digital deception: Spot counterfeit fragmentVIT-AP University
 
Australia 1901 - 1914
Australia 1901 - 1914Australia 1901 - 1914
Australia 1901 - 1914gcoloma
 
Bioenergy X1an China B
Bioenergy X1an China BBioenergy X1an China B
Bioenergy X1an China Beboroil
 
service marketing:real estate
service marketing:real estateservice marketing:real estate
service marketing:real estatevikaschauhan8888
 
strategic marketing :Scorpio
strategic marketing :Scorpiostrategic marketing :Scorpio
strategic marketing :Scorpiovikaschauhan8888
 
Shpend Stojkaj baza e të dhënave
Shpend Stojkaj baza e të dhënaveShpend Stojkaj baza e të dhënave
Shpend Stojkaj baza e të dhënaveShpend Stojkaj
 

Viewers also liked (15)

Do not belong
Do not belongDo not belong
Do not belong
 
appreciation of currency
appreciation of currencyappreciation of currency
appreciation of currency
 
110515 0445 Tops
110515 0445 Tops110515 0445 Tops
110515 0445 Tops
 
EVOLUTION OF STRUCTURE OF SOME BINARY GROUP-BASED N-BIT COMPARATOR, N-TO-2N D...
EVOLUTION OF STRUCTURE OF SOME BINARY GROUP-BASED N-BIT COMPARATOR, N-TO-2N D...EVOLUTION OF STRUCTURE OF SOME BINARY GROUP-BASED N-BIT COMPARATOR, N-TO-2N D...
EVOLUTION OF STRUCTURE OF SOME BINARY GROUP-BASED N-BIT COMPARATOR, N-TO-2N D...
 
strategic Alliance
strategic Alliancestrategic Alliance
strategic Alliance
 
Viky
VikyViky
Viky
 
120625 0814 Tops
120625 0814 Tops120625 0814 Tops
120625 0814 Tops
 
Us Presentation En
Us Presentation EnUs Presentation En
Us Presentation En
 
080202 Prev Projects
080202 Prev Projects080202 Prev Projects
080202 Prev Projects
 
Elucidating Digital deception: Spot counterfeit fragment
Elucidating Digital deception: Spot counterfeit fragmentElucidating Digital deception: Spot counterfeit fragment
Elucidating Digital deception: Spot counterfeit fragment
 
Australia 1901 - 1914
Australia 1901 - 1914Australia 1901 - 1914
Australia 1901 - 1914
 
Bioenergy X1an China B
Bioenergy X1an China BBioenergy X1an China B
Bioenergy X1an China B
 
service marketing:real estate
service marketing:real estateservice marketing:real estate
service marketing:real estate
 
strategic marketing :Scorpio
strategic marketing :Scorpiostrategic marketing :Scorpio
strategic marketing :Scorpio
 
Shpend Stojkaj baza e të dhënave
Shpend Stojkaj baza e të dhënaveShpend Stojkaj baza e të dhënave
Shpend Stojkaj baza e të dhënave
 

Passato

  • 1. #include "stdafx.h" #include <math.h> using namespace System; #include<iostream> using std::cout; using std::cin; using std::endl; int ingreso(); int comparacion(double,double,double); int par(int,char,double,double,double); void salida(double,double,double,double); int pa,n1,n2,n3,menor; char g; int main(array<System::String ^> ^args) { cout<<"tmenor de tres numerosn"; ingreso(); comparacion(n1,n2,n3); par(pa,g,n1,n2,n3); salida(n1,n2,n3,menor); Console::Read(); return 0; } int ingreso() { cout<<"nIngrese un numero :n"; cin>>n1; cout<<"nIngrese otro numero :n"; cin>>n2; cout<<"nIngrese otro numero :n"; cin>>n3; return n1,n2,n3; } int comparacion(double a,double b,double c) { if(a<b) { if(b<c) { menor=a; } } else { if(a<c) { if(c<b) { menor=a; } } } if(b<c) { if(c<a) {
  • 2. menor=b; } } else { if(b<a) { if(a<c) { menor=b; } } } if(c<b) { if(b<a) { menor=a; } } else { if(c<a) { if(a<b) { menor=a; } } } if (a==b) { if(b==c) { cout<<"n los numeros son iguales"; } } return menor; } int par(double pa,char g,double n1,double n2,double n3) { pa=fmod(n1,2); if(pa==0) { g="par"; } } void salida(double n1,double n2,double n3,double me,char g) { cout<<"nNumeros ingresados :"<<n1<<" "<<n2<<" "<<n3; if (menor==0) { cout<<"igales="<<n1;
  • 3. } else { cout<<"ntMenor ="<<me; } }