Skip to content

Instantly share code, notes, and snippets.

uses
crt;
var
N,i,j:byte;
a: array[1..20,1..20] of integer;
t:integer;
procedure VIVOD;
begin
@ernado
ernado / tester.py
Created September 9, 2012 10:55
Tester
# -*- coding:utf8 -*-
import random, sys
def input(t):
return raw_input(t).decode(sys.stdin.encoding)
MAX_MISTAKES = 0.2
words = {
'as': [u'как',u'так как' ],
'as well': [u'так же', ],
@ernado
ernado / lab1.cpp
Created September 9, 2012 22:01
Lab 01
#include <iostream>
#include <string>
#include "riostream.h"
#include <sstream>
using namespace std;
// returns <number> plural form from (<one>,<few>,<many>)
string pluralNumber(int number, string one, string few, string many)
{
@ernado
ernado / L3.3
Created September 19, 2012 18:28
Работает! :))
#include <iostream>
#include "riostream.h"
#include <math.h>
#include <iomanip>
using namespace std;
int main()
{char c; double x, y, s, a; int n;
for (x=0; x<1; x=x+0.2)
{y=log((1+x)/(1-x));
n=1;
@ernado
ernado / main.cpp
Created September 20, 2012 18:21
Lab04 by Zaikov
#include <math.h>
#include <windows.h>
#include <iostream>
using namespace std;
ostream& operator <<(ostream& os, const char *out)
{
char *chbuff = new char[strlen(out) + 1];
CharToOem(out, chbuff);
cout.write(chbuff, strlen(out));
void main()
{
//блок начался, нажимаем tab и делаем отступ
double x = 0;
for (int i=0; i<2; i++)
{
//опять блок начался, опять tab
x = x + 228.0;
//блок кончился, возвращаемся обратно
} //опа, возвратились
#include <stdlib.h> // Для функции exit()
#include <fstream> // Для файловых потоков
#include <iostream>
#include <windows.h>
//#include "ConsolCyr.h"
#include <string>
using namespace std;
const int lenName = 13; // max длина имени файла
const int lenString = 60; // Длина вспомогательного массива
#include <iostream>
using namespace std;
const int MAX_COUNT = 10; // максимальное количество слов
const int MAX_LENGTH = 80; // максимальная длинна слов
int main ()
{
char mass[MAX_COUNT][MAX_LENGTH];
int words=0; // текущее слово
#include <iostream>
#include <stdlib.h>
using namespace std;
int length(char *str)
{
int n = 0;
while (str[n]!=0) n++;
return n;
#include <iostream>
#include <fstream>
#include <stdlib.h> // не обязательно подключать
#include <iomanip>
using namespace std;
void ZAPMASKEY(ifstream&, int*&, int&);
void NEWDMASS(int *&, int&);
int main ()
{