Está en la página 1de 6

Programación Digital

LABORATORIO 01

APELLIDOS Y NOMBRES:…………………………………….
CODIGO 2002928272H

-EJERCICIOS PROPUESTOS

CONTENIDO:

*SOLUCIÓN DE EJERCICIOS DEL 1 AL 7*

 ENUNCIADO DEL PROBLEMA


 PSEUDOCÓDIGO DE PSEINT
 DIAGRAMA DE FLUJO
 EJECUCIÓN O PRUEBA DE CONSOLA
 CÓDIGO EN C++, Java
01 Enunciado de problema

…………………

…………

Solución

- PSEUDOCODIGO PSEINT:

Proceso Basico01

Definir temp1,temp2 Como Entero;

Definir resultado Como Real;

// Insrucciones

Escribir 'Ingrese TEMP01 :';

Leer temp1;

Escribir 'Ingrese TEMP02 :';

Leer temp2;

resultado <- temp1+temp2;

Escribir ' temp1+temp2 = ',resultado;

FinProceso

DIAGRAMA DE FLUJO:
EJECUCION O PRUEBA EN CONSOLA

CODIGO EN C++

#include<iostream>

using namespace std;

int main() {

float resultado;

int temp1;

int temp2;

// Insrucciones

cout << "Ingrese TEMP01 :" << endl;

cin >> temp1;

cout << "Ingrese TEMP02 :" << endl;

cin >> temp2;

resultado = temp1+temp2;

cout << " temp1+temp2 = " << resultado << endl;

return 0;

}
import java.io.*;

public class prueba {

public static void main(String args[]) throws IOException {

BufferedReader bufEntrada = new BufferedReader(new


InputStreamReader(System.in));

String nombre;

double resultado;

int variable1;

double variable2;

// Declaracion de las Variables

// Ingreso de Datos

System.out.println("Ingrese los datos de la Variable 1");

variable1 = Integer.parseInt(bufEntrada.readLine());

System.out.println("Ingrese los datos de la Variable 2");

variable2 = Double.parseDouble(bufEntrada.readLine());

System.out.println("Ingrese su Nombre");

nombre = bufEntrada.readLine();

// Proceso

resultado = variable1+2*variable2;

// Salida del Proceso

System.out.println(" El resultado de la operacion es: "+resultado+" unidades");

}
DIAGRAMA DE FLUJO

También podría gustarte