1 / 9

ESTRUCTURA DEL LENGUAJE C

ESTRUCTURA DEL LENGUAJE C. int main () { }. INSTRUCCIONES DEL LENGUAJE C: ESCRIBIR Y LEER. printf ( &quot;Ingrese el valor de a: &quot; ); scanf ( &quot;%f&quot; , &amp; a );. INSTRUCCIONES DEL LENGUAJE C: SI Y SINO. if ( numero % 2 == 0 ) { printf ( &quot;el numero es par<br> &quot; ); } Else {

jereni
Télécharger la présentation

ESTRUCTURA DEL LENGUAJE C

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. ESTRUCTURA DEL LENGUAJE C intmain(){}

  2. INSTRUCCIONES DEL LENGUAJE C:ESCRIBIR Y LEER printf("Ingrese el valor de a: "); scanf("%f",&a);

  3. INSTRUCCIONES DEL LENGUAJE C:SI Y SINO if(numero % 2==0) {printf("el numero es par\n"); } Else { printf("el numero es impar\n"); }

  4. Algoritmo 1: Hola mundo. Proceso AlgoritmoEscribir "Hola mundo!"; Escribir“ “;Fin Proceso

  5. Algoritmo 1: Hola mundo. #include <stdio.h>#include <stdlib.h>intmain(){printf("Hola mundo!\n");printf("\n");system("pause");return EXIT_SUCCESS;}

  6. Algoritmo 2: Suma de 2 números Proceso AlgoritmoEscribir "Ingrese el valor de a:";Leer a;Escribir "Ingrese el valor de b:";Leer b;    suma <-a+b;Escribir "Valor de suma: ", suma;FinProceso

  7. Algoritmo 2: Suma de 2 números #include <stdio.h>#include <stdlib.h>intmain(){float a, b, suma;printf("Ingrese el valor de a: ");scanf("%f",&a);printf("Ingrese el valor de b: ");scanf("%f",&b);    suma=a+b;printf("Valor de suma: %g\n", suma);printf("\n");system("pause");return EXIT_SUCCESS;}

  8. Algoritmo 3: Numero par o impar Proceso AlgoritmoEscribir "Ingrese el valor de numero:";Leer numero;Si numero MOD 2 = 0 EntoncesEscribir "el numero es par";SiNoEscribir "el numero es impar";FinSiFinProceso

  9. Algoritmo 3: Numero par o impar #include <stdio.h>#include <stdlib.h> intmain(){int numero;printf("Ingrese el valor de numero: ");scanf("%d",&numero);if(numero%2==0)printf("el numero es par\n");elseprintf("el numero es impar\n");printf("\n");system("pause");return EXIT_SUCCESS;}

More Related