Skip to content

Instantly share code, notes, and snippets.

View draganczukp's full-sized avatar

Przemek Dragańczuk draganczukp

View GitHub Profile
@draganczukp
draganczukp / marcin.cpp
Created June 2, 2017 08:48
Trójkąt z gwiazdek
#include <iostream>
using namespace std;
int main()
{
int wys = 0;
#include "main.h"
#include <stdio.h>
#include <stdlib.h>
#define N 5
#define M 5
void wyswietl(int tab[][M], int size);
void min(int tab[][M], int size);
void max(int tab[][M], int size);
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
void processInput(char in);
void newGame();
void play();
using namespace std;
int licz(int n){
int suma = 0;
// Nie pamiętam do ilu trzebabyło sumować
for(int i = 0; i < 1000; i+=2){
suma += i;
}
return 2 * (suma*suma*suma);
@draganczukp
draganczukp / throw.cpp
Created April 5, 2018 14:36
throw.cpp
class Kurczak{
private:
float cena;
float waga;
// int data produkcji;
// Datę pomijam bo zbędna
public:
Kurczak(float cena, float waga, int data){
if(cena > 0) this->cena = cena; else throw new Exception("Zła cena");
if(waga > 0 && waga < 10) this->waga = waga; else throw new Exception("Zła waga");
.model tiny
.386
.data
pytanie db "Podaj znak: $"
newline db 10,13,'$'
podzielne db 10,13,"Podzielne$"
niepodz db 10,13,"Nie podzielne$"
.stack 100h
.code
start:
.model tiny
.386
.data
pytanie db "Podaj liczbe: $"
newline db 10,13,'$'
mniejsze db 10,13,"a<b$"
wieksze db 10,13,"a>b$"
rowne db 10,13,"a=b$"
.stack 100h
.code
call plug#begin('~/.local/share/nvim/plugged')
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'tpope/vim-sensible'
Plug 'tpope/vim-fugitive'
" Plug 'tpope/vim-surround'
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <exception>
#include <sstream>
using namespace std;
class A{
public:
.model tiny
.386
.data
wiersz db 255 dup (?)
.stack 100h
.code
start:
mov ax, @data
mov ds, ax
xor ax, ax