Ayuda, String y condicional, debe poner tu nombre al poner un par.
Publicado por Miguel (5 intervenciones) el 10/07/2020 01:34:30
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* Programa: CONDICIONALES */
#include <conio.h>
#include <stdio.h>
#include <string>
int main()
{
printf("ESCRIBE TU NOMBRE :");
scanf("%s,nombre");
int numero;
printf( "\n Introduzca un numero entero: " );
scanf( "%d", &numero );
if (string( nombre, numero % 2 == 0 )
printf( nombre );
else
printf( "\n HOLA MUNDO" );
getch(); /* Pausa */
return 0;
Valora esta pregunta
0