Beruflich Dokumente
Kultur Dokumente
Algoritmos
1. Inicio
2. muestrer en pantalla el mensaje Bienvenido
3. Fin
#include <iostream.h>
#include <math.h>
Int main ()
{
Cout <<Bienvenido<<endl;
Return 0;
Diagrama De Flujo
Inicio
Muestre en pantalla
el mensaje Bienvenido
Fin
ALGORITMO:
1. Inicio
2. Mostrar en pantalla el mensaje Small Basic no tiene
misterios
3. Fin
#include <iostream.h>
#include <math.h>
Int main ()
{
Cout <<Small Basic no tiene misterios<< endl;
Return 0;
DIAGRAMA DE FLUJO:
Inicio
Fin
ALGORITMO:
1.
2.
3.
4.
5.
Inicio
a=100, b=120, t=0
D=a+b
muestrer el resultado de la suma
Fin
#include <iostream.h>
#include <math.h>
Int main ()
{
Int d=100, e=120, t=0;
D=a+b;
Cout <<El resultado de la suma es:<<c;
Return 0;
DIAGRAMA DE FLUJO:
Inicio
D=a+b
Fin
ALGORITMO:
1.
2.
3.
4.
5.
Inicio
m=50, b=51,k=0
k=m*b
Mostrar el resultado del producto
fin
#include <iostream.h>
#include <math.h>
Int main ()
{
Int m=50, b=51, k=0;
k=m*b;
Cout <<El resultado del producto es: <<c;
Return 0;
DIAGRAMA DE FLUJO:
Inicio
k=m*b
Fin
ALGORITMO:
1.
2.
3.
4.
5.
Inicio
x=23, y=24, z=25, suma=0
S= x+y+z
Mostrar en pantalla la suma
Fin
#include <iostream.h>
#include <math.h>
Int main ()
{
Int X=23, Y=24, Z=25, S=0;
S= x+y+z;
Cout <<El total de la suma es: <<s;
Return 0
DIAGRAMA DE FLUJO
Inicio
s= x+y+z
Fin
ALGORITMO:
1.
2.
3.
4.
5.
Inicio
x=10, y=11, z=12, producto=0
Producto=x*y*z
Mostrar en pantalla el resultado del producto
Fin
#include <iostream.h>
#include <math.h>
Int main ()
{
Int x=10, y=11, z=12, producto=0;
Producto=x*y*z;
Cout <<El resultado del producto es: <<producto;
Return 0;
DIAGRAMA DE FLUJO:
Inicio
Producto=x*y*z
Mostrar en pantalla el
resultado del producto
Fin
ALGORITMO:
1.
2.
3.
4.
5.
6.
7.
Inicio
a=0, b=0, t=0
Ingrese primer numero
Ingrese segundo numero
T=a+b
Desplegar en pantalla el resultado de la suma
Fin
{
Int a=0, b=0, t=0;
Cout <<ingrese primer numero:;
Cin >> a;
Cout <<ingrese segundo numero:;
Cin >>b;
T=a+b;
Cout <<El total de la suma es: <<t;
Return 0;
DIAGRAMA DE FLUJO
Inicio
T=a+b
Desplegar en pantalla
el resultado de la suma
Fin
ALGORITMO:
1.
2.
3.
4.
5.
6.
7.
Inicio
N1=0,n2=0, p=0
Ingrese primer numero
Ingrese segundo numero
P=n1*n2
Desplegar en pantalla el resultado de la multiplicacin
Fin
#include <iostream.h>
#include <math.h>
Int main ()
{
Int n1=0, n2=0, p=0;
Cout <<ingrese primer numero:;
Cin>> n1;
Cout <<ingrese segundo numero:;
Cin >> n2;
P=n1*n2;
Cout <<el total de la multiplicacin es:<<p;
Return 0;
DIAGRAMA DE FLUJO
Inicio
P=n1*n2
Desplegar en pantalla el
Resultado de la multiplicacin
Fin
ALGORITMO
1.
2.
3.
4.
5.
6.
7.
Inicio
dato 1= 0, dato2=0, e=0
Ingrese primer numero
Ingrese segundo numero
E=dato 1/dato 2
Mostrar el resultado de la divisin en pantalla
Fin
#include <iostream.h>
#include <math.h>
Int main ()
{
Int dato l=0, dato 2=0, e=0;
Cout <<ingrese primer numero:;
Cin>> dato 1;
Cout <<ingrese segundo numero:;
Cin >> dato 2;
E=dato 1/dato 2;
Cout <<el total de la divisin es:<<e;
Return 0;
DIAGRAMA DE FLUJO:
Inicio
E=dato1/dato 2
Mostrar el resultado de la
divisin en pantalla
Fin
ALGORITMO:
1. Inicio
2. Ingrese primer numero
#include <iostream.h>
#include <math.h>
Int main ()
{
Cout <<ingrese primer numero:;
Cin>> dato 1;
Cout <<ingrese segundo numero:;
Cin >> dato 2;
If (dato 2=0);
Cout<< error, ingrese un numero que no sea cero:;
Cout<<regresar al paso 3:;
Else
Cin>> N= dato 1/dato 2;
Cout<<el total de la divisin es:<<n;
Return o;
DIAGRAMA DE FLUJO:
Inicio
If dato 2 es = o
Verdadero
N= dato 1/dato 2
Mostrar el resultado + n
Fin
Falso