You are on page 1of 7

DARIO GUEVARA

YAUCAN

MILTON
6TO “D”

6 PROGRAMAS

2010-2011
PRIMER: PROGRAMA QUE DEFINE SI UN NUMERO ES PAR O IMPAR

//programa para calcular si un numero es par o impar


#include<iostream.h>
#include<conio.h>
#include<stdio.h>
void main()
{
 int num;
 clrscr();
 cout<<"programa para calcular si un numero es par o impar:";
 gotoxy(1,5);
 cout<<"ingrese un numero:";
 cin>>num;
   gotoxy(1,7);
 if(2==0)
  cout<<"es par";
 else
    cout<<"es impar";
 getch();
}

Segundo:PROGRAMA PARA CALCULAR SI UN NUMERO ES PER O IMPAR CON


REPETICION

//programa para calcular si un numero es par o impar


#include<iostream.h>
#include<conio.h>
#include<stdio.h>
void main()
{
 int num;
 clrscr();
 cout<<"programa para calcular si un numero es par o impar:";
 gotoxy(1,5);
 cout<<"ingrese un numero:";
 cin>>num;
   gotoxy(1,7);
 if(2==0)

clrscr();
  cout<<"es par";
 else
    cout<<"es impar";
 getch();
}
tercero:PROGRAMA PARA INGRESAR MIS DATOS

programa
//programa para calcular los datos mios
#include<iostream.h>
#include<conio.h>
#include<stdio.h>
void main ()
{
int ced,e,tel;
char nom [30];
char dir [30];
clrscr();
gotoxy(5,2);
cout<<"MIS DATOS";
gotoxy(2,4);
cout<<"ingrese cedula " ;
cin>>ced;
gotoxy(2,5);
cout<<"ingrese telefono ";
cin>>tel;
gotoxy(2,6) ;
cout<<"ingrese la edad ";
cin>>e;
gotoxy(2,7);
cout<<"ingrese su nombre ";
cin>>nom;
gotoxy(2,8);
cout<<"ingrese direccion ";
cin>>dir;

cout<<"MIS DATOS SON"; endl;


cout<<CED;ENDL;
cout<<NOM;ENDL;
cout<<E;ENDL;
cout<<DIR;ENDL;
cout<<TEL;
getch();
}
CUARTO: PROGRAMA PARA IMPRIMIR SOLO NUMEROS 1

#include<iostream.h>
#include<conio.h>
#include<stdio.h>
void main ()
{

Int n[10];

Int I =1;

Do{

Cput<<1<<endl;

i++;

}while(i<=n[10]);

Getch();

}
Suma de los números pares e impares

#include<iostream.h>

#include<conio.h>

#include<stdio.h>

void main ()

Int par[10];

Int impar [10];

Int I,j,x,n,s,si;

S=0;

For(i=1;i<=10;i++)

Cout<<”ingrese un numero ”<<i<<endl;

Cin>>n

Par[i]=n

Cout<<”el vector ingresado es : ”<<endl;

For(j=1;j<=10;j++)

Cout<<par[j]endl<<;

Getch();

For(x=1;x<=10;j++)

S=s+par[x];

Else

Si=si+par[x];

Cout<<”la suma de los números pares son : ”<<s<<endl;

Cout<<”la suma de los números impares son: ”<<si<<endl;

Getch();

}
Programa que imprime la serie del 1234512345

//PROGRAMA QUE MUESTRA LOS NUMEROS DEL 1 AL 5

//AUTOR: MILTON YAUCAN

//CURSO: 6to "D"

#include<iostream.h>

#include<conio.h>

#include<stdio.h>

void main ()

int num[2];

int n,nu,i=0; int j=0 ;

for (i=1;i<=5;i++)

cout<<"EL VECTOR ES: "<<i<<endl;

for(j=1; j <=5;j=j+1)

cout<<"EL VECTOR ES: "<<j<<endl;

PROGRAMA QUE MULTIPLICA DOS VESTORES E IMPRIME EL RESULTADO EN


UN TERCER VECTOR

//PROGRAMA QUE MULTIPLICA DOS VECTORES

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

#include<stdio.h>

void main ()

int num[2];

int n,nu,i=0; int j=0 ; int x=0

for (i=1;i<=10;i++)

cout<<"EL VECTOR ES: "<<5<<endl;

for(j=1; j <=10;j=j+1)

cout<<"EL VECTOR ES: "<<j<<endl;

For(x=1;x<=10;x++)

Num[x]=(5*j);

Cout<<”el vector es : ”<<num[x]<<endl;

Getch();

You might also like