Archiwa kategorii: Bez kategorii

Aplikacja nr 4

#include <iostream>
#include <iomanip>
#include <cstdlib>
#include <windows.h>

using namespace std;
int main()
{
HANDLE hOut;
hOut = GetStdHandle ( STD_OUTPUT_HANDLE);

SetConsoleTextAttribute(hOut, FOREGROUND_BLUE);

setlocale(LC_ALL,””);

cout<<
„XX……XX”
<< endl;
SetConsoleTextAttribute(hOut, FOREGROUND_GREEN);
cout<<
„X……..X”
<< endl;
SetConsoleTextAttribute(hOut, FOREGROUND_RED);
cout<<
„X.XXXXXX.X”
<< endl;
SetConsoleTextAttribute(hOut, FOREGROUND_GREEN| FOREGROUND_RED| FOREGROUND_INTENSITY);
cout<<
„X.XXXXXX.X”
<< endl;
SetConsoleTextAttribute(hOut, FOREGROUND_RED);
cout<<
„X.XXXXXX.X”
<<endl;
SetConsoleTextAttribute(hOut, FOREGROUND_BLUE);
cout<<
„X.XXXXXX.X”
<< endl;
SetConsoleTextAttribute(hOut, FOREGROUND_GREEN);
cout<<
„X.XXXXXX.X”
<< endl;
SetConsoleTextAttribute(hOut, FOREGROUND_RED| FOREGROUND_BLUE| FOREGROUND_INTENSITY);
cout<<
„X.XXXXXX.X”
<< endl;
SetConsoleTextAttribute(hOut, FOREGROUND_BLUE);
cout<<
„X……..X”
<< endl;
SetConsoleTextAttribute(hOut, FOREGROUND_GREEN);
cout<<
„XX……XX”
<< endl;
return 0;
}

Aplikacja nr 3

#include <iostream>
#include <iomanip>
#include <cstdlib>
#include <windows.h>

using namespace std;
int main()
{
HANDLE hOut;
hOut = GetStdHandle ( STD_OUTPUT_HANDLE);

SetConsoleTextAttribute(hOut, FOREGROUND_BLUE);

setlocale(LC_ALL,””);

cout<<
„XX……XX”
<< endl;
SetConsoleTextAttribute(hOut, FOREGROUND_GREEN);
cout<<
„X……..X”
<< endl;
SetConsoleTextAttribute(hOut, FOREGROUND_RED);
cout<<
„X.XXXXXX.X”
<< endl;
SetConsoleTextAttribute(hOut, FOREGROUND_GREEN| FOREGROUND_RED| FOREGROUND_INTENSITY);
cout<<
„X.XXXXXX.X”
<< endl;
SetConsoleTextAttribute(hOut, FOREGROUND_RED);
cout<<
„X.XXXXXX.X”
<<endl;
SetConsoleTextAttribute(hOut, FOREGROUND_BLUE);
cout<<
„X.XXXXXX.X”
<< endl;
SetConsoleTextAttribute(hOut, FOREGROUND_GREEN);
cout<<
„X.XXXXXX.X”
<< endl;
SetConsoleTextAttribute(hOut, FOREGROUND_RED| FOREGROUND_BLUE| FOREGROUND_INTENSITY);
cout<<
„X.XXXXXX.X”
<< endl;
SetConsoleTextAttribute(hOut, FOREGROUND_BLUE);
cout<<
„X……..X”
<< endl;
SetConsoleTextAttribute(hOut, FOREGROUND_GREEN);
cout<<
„XX……XX”
<< endl;
return 0;
}

Aplikacja nr 2

#include <iostream>

using namespace std;

int a,b;

int main()
{ setlocale(LC_ALL,””);
cout << „Program sumuj¹cy liczby a i b” << endl;
cout << „—————————–” << endl;
cout << „podaj liczbê a: „;
cin >> a;
cout << „Podaj liczbê b: „;
cin >> b;
cout << „Wynik dodawania a+b to: „;
cout << a+b;
return 0;
}