[ create a new paste ] login | about

Link: http://codepad.org/CF0vVMmr    [ raw code | output | fork ]

salvador@conclase.net - C++, pasted on Oct 26:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Muestra el alfabeto de mayúsculas y minúsculas 
#include <iostream>
using namespace std;

int main() 
{ 
   char a; // Variable auxiliar para los bucles 

   // El bucle de las mayúsculas lo haremos con un while
   a = 'A'; 
   while(a <= 'Z') cout << a++; 
   cout << endl; // Cambio de línea 

   // El bucle de las minúsculas lo haremos con un for 
   for(a = 'a'; a <= 'z'; a++) cout << a; 
   cout << endl; // Cambio de línea 
   return 0; 
}


Output:
1
2
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz


Create a new paste based on this one


Comments: