Cosas ke hay ke saber

Páginas: 12 (2815 palabras) Publicado: 10 de enero de 2012
Presentación

Nombre: Elio Hernández Flores

Carrera: Ing. En Sistemas Computacionales

Semestre: 2do

No. De Control: E1102042
//velocidad.c
analisis
1.- Leer distancia
2.- Leer tiempo
3.- Calcular vel (v=d/t)
4.- Imprimir vel

inicio
inicio
Diseño

Float dist,vel,tiempo
Float dist,vel,tiempo

Dist,tiemp
Dist,tiemp

Velocidad=dist/tiemp
Velocidad=dist/tiemp

Vel
VelFin
Fin

Codigo
//velocidad.c
#include <stdio.h>
main()
{
Float dist,vel,tiemp;
Printf(“distancia: “);
Scanf(“%f”,&dist);
Printf(“\n velocidad: “);
Scanf(“%f”,&vel);
Vel=dist/tiemp
Printf(“\n velocidad: %f km/h”,vel);
}

1.- leer t,d
2.- calcular v=d/t
3.-imprimir V
1.- leer t,d
2.- calcular v=d/t
3.-imprimir V
V1.0

4.- valor ref=90
4.1 v>=90 ->rápido
4.2 v<90 -> lento

4.- valor ref=90
4.1 v>=90 -> rápido
4.2 v<90 -> lento

V2.0

V3.0 5.- Ciclo

inicio
inicio
Diseño

Float d,t,v
Char seguimos=´s´
Float d,t,v
Char seguimos=´s´

While
Seguimos==´s´
While
Seguimos==´s´

Si
Si
No
No

FIN
FIN

D,t
D,t

V=d/t
V=d/t

V
V

Si
Si
No
No
If v>=20
If v>=20Rapido
Rapido
Lento
Lento
Sguimos
Sguimos

//Misegundoprograma.c
#include <stdio.h>
main ()
{
Printf(“Este es mi Segundo programa \n “);
}

//Temperatura.c
#include <stdio.h>
main ()
{
Int I;
Int temp;
Temp-25;
Printf(“La temperature es dé %i grados” , temp);
}
//Temperaturav2.c
#include <stdio.h>
main()
{
Int tempdentro tempfuera;
Tempdentro=25;Tempfuera=tempdentro+5;
Printf(“La temperatura dentro del salón es dé %i grados\n”,tempdentro);
Printf(“La temperatura fuera es dé %i grados”,tempfuera);
}
Inicio
Inicio
//Misegundoprograma.c
fin
fin
Scanf (tempdentro)

Scanf (tempdentro)

Printf tempfura
Printf tempfura
Tempfuera=tempdentro+5
Tempfuera=tempdentro+5
Int tempdentro tempfuera
Int tempdentro tempfueraCodigo
#include<stdio.h>
main()
{
Int tempdentro, tempfuera;
Tempdentro=20
Printf(“Dame valor de temp dentro: “);
Scanf(“%i”,&tempdentro);
Tempfuera = tempdetrno+5;
Printf(“La temp dentro del salón es dé %i grados\n”,tempdentro);
Printf(“La temp fuera es dé %i grados”,tempfuera);
}

//velocidadv3.c
#include<stdio.h>
main()
{
Float d,t,v;
Charsegumis=´s´
While (seguimos==´s´)
{
Printf(“dame d:”);
Scanf(“%f”,&d);
Printf(“\nDame t: “);
Scanf(“%f”,&t);
V=d/t;
Printf(“vel: %f km/h”,v);
If(v>=90)
Printf(“rapido”);
Else
Printf(“Lento”);
Printf(“\n segumis? s/n”);
Scanf(“%S”,&seguimos);
}
}

Problema:
Obtener la cuenta total de cada cliente que transmite mercancía por el pos
Análisis
1.- Cadaartículo al lerse deberá proporcionar su código, desor,cantidad y precio.
2.- El programa debra ir llevando una cuenta acumulada general
2.1.- cobrarle al cliente al final
2.3.- Entregar su corte Z
3.- Debera entregar al cliente:
3.1 Cuenta total
3.2 infresar monto pagado
3.3 informar cambio
4.- imprimir ticket

Inicio
Inicio

Diseño
Fin

Fin

Cambio ,acimportecorte

Cambio , acimportecorte

Cambio=pago-acimporteCTE
Cambio=pago-acimporteCTE
Scanf (pago)
Scanf (pago)
Total cte
Total cte
Importe=cantidad*precio;
Acimporte=acimportecte+importe
Acimporte=acimportecte+acimporteCTE

Importe=cantidad*precio;
Acimporte=acimportecte+importe
Acimporte=acimportecte+acimporteCTE

Scanf (código,descrip,cantidad,precio)
Scanf(código,descrip,cantidad,precio)
Int código,cantidad;
Float orecio,montopago,acimporte,pago,cora,acimporte=0.0;
Char [40];
Int código,cantidad;
Float orecio,montopago,acimporte,pago,cora,acimporte=0.0;
Char [40];


Codigo
//POS punto de venta pos.c

#include <stdio.h>

main()
{

//2. declaracion e inicialización de variables
int codigo, cantidad=0;
float precio, importe,...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Lo ke no sabes
  • Lo ke sabemos
  • nose ke cosa
  • KE
  • lo ke sea
  • Ke$ha
  • Lo Ke Sea
  • Lo ke sea

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS