1 / 14

Programa “Hola2”

UNIVERSIDAD AUTONOMA METROPOLITANA. Programa “Hola2”. Departamento de Sistemas División de Ciencias Básicas e Ingeniería. 1. UNIVERSIDAD AUTONOMA METROPOLITANA. A) Las acciones que realiza este programa son las siguientes. 2. UNIVERSIDAD AUTONOMA METROPOLITANA.

shirin
Download Presentation

Programa “Hola2”

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. UNIVERSIDAD AUTONOMA METROPOLITANA Programa “Hola2” Departamento de Sistemas División de Ciencias Básicas e Ingeniería 1

  2. UNIVERSIDAD AUTONOMA METROPOLITANA A) Las acciones que realiza este programa son las siguientes. 2

  3. UNIVERSIDAD AUTONOMA METROPOLITANA 1.- Imprime el siguiente saludo: "Hola! Como te llamas? Y se hace un salto de renglón 2.- Mediante el teclado se ingresa un nombre (Cualquiera). Para este caso se usará el nombre: Berenice: Berenice Y se da un ENTER 3.- Imprime la siguiente pregunta: Que tal estas, Berenice? Y se hace un salto de renglón. 3

  4. UNIVERSIDAD AUTONOMA METROPOLITANA En resumen y al final de cuentas en este programa se debe de realizar lo siguiente: "Hola! Como te llamas? Berenice Que tal estas, Berenice? 4

  5. UNIVERSIDAD AUTONOMA METROPOLITANA B) Variables de Entrada nombre 5

  6. UNIVERSIDAD AUTONOMA METROPOLITANA nombre -Esta variable de entrada debe ser del tipo: char -Esta variable de entrada es una cadena de caracteres la cuál se definirá con un tamaño no mayor a 30 caracteres. 6

  7. UNIVERSIDAD AUTONOMA METROPOLITANA C) Diagrama de flujo 7

  8. 8

  9. UNIVERSIDAD AUTONOMA METROPOLITANA D) Código en Lenguaje C 9

  10. UNIVERSIDAD AUTONOMA METROPOLITANA /* fichero hola2.c */ /* Este programa saluda más personalmente */ #include <stdio.h> #include <stdlib.h> int main() { system("pause"); return 0; } 10

  11. UNIVERSIDAD AUTONOMA METROPOLITANA 11

  12. UNIVERSIDAD AUTONOMA METROPOLITANA /* fichero hola2.c */ /* Este programa saluda más personalmente */ #include <stdio.h> #include <stdlib.h> int main() { char nombre[30]; printf("Hola! Como te llamas?\n"); system("pause"); return 0; } 12

  13. UNIVERSIDAD AUTONOMA METROPOLITANA /* fichero hola2.c */ /* Este programa saluda más personalmente */ #include <stdio.h> #include <stdlib.h> int main() { char nombre[30]; printf("Hola! Como te llamas?\n"); scanf("%s", nombre); system("pause"); return 0; } 13

  14. UNIVERSIDAD AUTONOMA METROPOLITANA /* fichero hola2.c */ /* Este programa saluda más personalmente */ #include <stdio.h> #include <stdlib.h> int main() { char nombre[30]; printf("Hola! Como te llamas?\n"); scanf("%s", nombre); printf("Que tal estas, %s?\n", nombre); system("pause"); return 0; } 14

More Related