//Descripcion: Programa que muestra por la pantalla del alfabeto intercaldo
// mayúsculas y minisculas
//Autor: Anderson Ponciano
//Fecha: 12/05/20
#include <iostream>
#include <cctype> // Para el uso de 'toupper'
using namespace std;
int main ()
{
bool mayusculas=true;
char a='a';
int i;
system ("color f0");
while ((a!='z'+1)&&(a!='z'+1)) //Primera linea
{
if (mayusculas) a=toupper(a);
else a=tolower(a);
mayusculas=!mayusculas;
cout << a;
a++;
}
cout << endl;
a='a';
while ((a!='z'+1)&&(a!='z'+1)) //Segunda linea
{
if (!mayusculas) a=toupper(a);
else a=tolower(a);
mayusculas=!mayusculas;
cout << a;
a++;
}
cout << endl;
a='a';
i=0;
while ((a!='z'+1)&&(a!='z'+1)) //Tercera Linea
{
if (mayusculas) a=toupper(a);
else a=tolower(a);
if (i%2) mayusculas=!mayusculas;
cout << a;
a++;
i++;
}
cout << endl;
a='a';
while ((a!='z'+1)&&(a!='z'+1)) //Cuarta Linea
{
if (mayusculas) a=toupper(a);
else a=tolower(a);
if (i%2) mayusculas=!mayusculas;
cout << a;
a++;
i++;
}
cout << endl;
cin.get();
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: