Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdlib>
- #include <iostream>
- #include <windows.h>
- #include <cmath>
- #include <conio.h>
- #include <stdio.h>
- using namespace std;
- void gotoxy(int x, int y)
- {
- COORD c;
- c.X=x - 1;
- c.Y = y -1;
- SetConsoleCursorPosition (GetStdHandle(STD_OUTPUT_HANDLE), c);
- }
- void menu();
- void litery();
- void cyfry();
- void losowe();
- void litery();
- int wybor;
- char a='a';
- int m=0;
- int p=0;
- int w=0;
- int k=0;
- char g;
- int main(int argc, char *argv[])
- {
- cout << "podaj znak: ";
- cin >> g;
- menu();
- return EXIT_SUCCESS;
- }
- void menu()
- {
- cout << "###################### "<<endl;
- cout << "# Witaj! # "<<endl ;
- cout << "# Wybierz madrze # " <<endl;
- cout << "# [1] litery # "<<endl ;
- cout << "# [2] Cyfry # " <<endl;
- cout << "# [3] Losowe # " <<endl;
- cout << "###################### " <<endl;
- wybor=getch();
- if(wybor=='1')
- {
- litery();
- }
- if(wybor=='2')
- {
- cyfry();
- }
- if(wybor=='3')
- {
- losowe();
- }
- }
- void litery(){
- system("CLS");
- system("color a");
- gotoxy(1,1);
- for(p=0; p<5; p++){
- for(int i=0x41; i<=0x5A; ++i){
- printf("%c",i);
- }
- }
- gotoxy(1,2);
- for(int u=0; u<2;u++){
- for(int i=0x41; i<=0x5A; ++i){
- printf("%c A \n",i);
- } }
- gotoxy(1,30);
- for(w=0; w<5; w++){
- for(int i=0x41; i<=0x5A; ++i){
- printf("%c",i);
- }
- }
- gotoxy(16,16);
- cout <<"Pan Zurawski jest nalepszy";
- gotoxy(1,1);
- getch();
- }
- void cyfry()
- {
- system("color d");
- system("CLS");
- int l=0;
- for(;l<64;l++){
- cout << l;
- }
- //petla zeby bylo od 0-9
- int z=0;
- for(;z<3;z++){
- int c=0;
- cout << "1"<<endl;
- //petla piszaca 0-9
- for(;c<9;c++){
- cout << c<< " "<<c<<endl;
- }
- }
- gotoxy(1,30);
- for(;m<64;m++){
- cout <<m;
- }
- gotoxy(119,30);
- cout << g;
- gotoxy(119,11);
- cout<<g;
- gotoxy(119,21);
- cout<<g;
- gotoxy(1,30);
- cout << g;
- gotoxy(1,1);
- cout << g;
- gotoxy(119,1);
- cout << g;
- gotoxy(16,16);
- cout <<"Pan Zurawski jest nalepszy";
- gotoxy(1,1);
- getch();
- }
- void losowe(){
- cout << "loowe";
- getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement