Skip to content

Instantly share code, notes, and snippets.

View horvathgyozo's full-sized avatar

Győző Horváth horvathgyozo

  • Eötvös Loránd University
  • Budapest, Hungary
View GitHub Profile
@horvathgyozo
horvathgyozo / konyvtar.cpp
Last active November 29, 2016 07:25
Könyvtáros példa beolvasása
#include <iostream>
using namespace std;
const int MAXN = 100;
typedef struct {
string szerzo, cim;
int db, kdb;
} Konyv;
J.R.R. Tolkien
A hobbit
1970
J.K. Rowling
Harry Potter és a bölcsek köve
1998
Karl May
Winnetou
1960
#include <iostream>
using namespace std;
void beolvas(int &n, string sz[100+1]) {
//2. be
bool jo;
do {
cout << "N=";
#include <iostream>
using namespace std;
int main()
{
//1. dekl, beki
int n; //be
string sz[100+1]; //be
bool ferfi;
#include <iostream>
using namespace std;
int main()
{
//1. dekl
int n;
const int MAXN = 100;
int evek[MAXN+1];
#include <iostream>
using namespace std;
int main()
{
//1. dekl
string lap;
int ert;
const string lapok[8+1] = {
#include <iostream>
using namespace std;
int main()
{
//1. dekl
int n;
string nap;
const string napok[7+1] = {
@horvathgyozo
horvathgyozo / progalap_tanari_3_gyakorlat.md
Created October 5, 2016 14:38
ProgAlap tanári: 3. gyakorlat

Óra

  • Elágazásos feladatsor: síknegyed

    • Utófeltétel: implikáció
    • Utófeltétel: többirányú vagy egymásba ágyazott két irányú implikáció
    • Algoritmus1: többirányú elágazással
    • Algoritmus2: egymásba ágyazott kétirányú elágazásokkal
  • Ciklusos feladatsor/1: faktoriális

  • Algoritmus: számlálós ciklus bevezetése

@horvathgyozo
horvathgyozo / madaras.pas
Created September 28, 2016 12:02
Algtanl: madaras feladat (tételek összeépítése óra, 4. gyakorlat)
program untitled;
const MAXN = 200;
MAXM = 50;
type Tmdb = array[1..MAXM,1..MAXN] of integer;
var n, m: integer; //spec be
mdb: Tmdb; //spec be
maxv: integer; //spec ki
procedure beolvasas(var m, n: integer; var mdb: Tmdb);
@horvathgyozo
horvathgyozo / main.cpp
Created September 27, 2016 07:48
Progalap: védett falak (példa megoldás)
#include <iostream>
#include <vector>
using namespace std;
void beolvas(vector<bool> &orhelyek)
{
int n;
cin >> n;