Pues sólo cámbiale la URL! ¬¬!
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú#include <stdio.h>
int main(){
int ar = 0, br = 0 ;
printf("Ingrese numero 1: "); scanf("%d", &ar);
printf("Ingrese numero 2: "); scanf("%d", &br);
while(( ar != br ) && ( ar < br )){
ar++;
printf("%d\n", ar);
}
if( ar = br ){ printf("Hecho!\n"); }
return 0;
}
Hecho!alex@shellroot:~/Escritorio$ g++ PoC.cpp
alex@shellroot:~/Escritorio$ ./a.out
Ingrese numero 1: 1
Ingrese numero 2: 9
2
3
4
5
6
7
8
9
Hecho!
#include <stdio.h>
int sNum1 = 0;
int sNum2 = 0;
int sResult = 0;
int main(){
printf("Ingrese numero 1: ");
scanf("%d", &sNum1);
printf("Ingrese numero 2: ");
scanf("%d", &sNum2);
sResult = sNum1 + sNum2;
printf("%d\n", sResult);
}
alex@shellroot:~/Escritorio$ g++ PoC.cpp
alex@shellroot:~/Escritorio$ ./a.out
Ingrese numero 1: 4
Ingrese numero 2: 3
7
struct [<identificador>] {
[<tipo> <nombre_objeto>[,<nombre_objeto>,...]];
} [<objeto_estructura>[,<objeto_estructura>,...];
struct datos{
char modelo[20];
int ano;
char marca[20];
} PoC;
cin>>PoC.ano;
#include <iostream>
using namespace std;
/* ESTRUCTURA */
struct ejemplo{
char sNombre [20];
char sApellido [20];
} PoC;
int main(){
/* INGRESAR DATOS */
cout << "Ingresar nombre: ";
cin.getline( PoC.sNombre, 20, '\n' );
cout << "Ingresar apellido: ";
cin.getline( PoC.sApellido, 20, '\n' );
/* MOSTRAR DATOS */
cout << "Nombre: " << PoC.sNombre << endl;
cout << "Apellido: " << PoC.sApellido << endl;
return 0;
}
alex@shellroot:~/Escritorio$ g++ PoC.cpp
alex@shellroot:~/Escritorio$ ./a.out
Ingresar nombre: alex
Ingresar apellido: root
Nombre: alex
Apellido: root