Skip to content

Instantly share code, notes, and snippets.

View nesterione's full-sized avatar
:electron:
doing well

Ihar Nestsiarenia nesterione

:electron:
doing well
View GitHub Profile
__author__ = 'igor'
import math
import random
def integr(a,b,n, func):
h = (b - a)/n
sm = 0
for i in range(0,n):
y = func(a+h*i)
sm += y*h
@nesterione
nesterione / listOfStruct.c
Created January 17, 2015 14:59
work with structs example
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
struct story {
char fio[30];
char diagnos[30];
char dat[30];
char notes[30];
};
@nesterione
nesterione / findZerosInCollumns.c
Last active August 29, 2015 14:13
Найти столбцы имеющие нулевые элементы
#include <stdio.h>
/**
* find columns with zero elements
*/
void printMx(int n,int m,int mx[n][m]) {
int i,j;
for(i = 0; i< n; i++) {
for(j = 0; j< m; j++) {
printf(" %d ", mx[i][j]);
}
@nesterione
nesterione / dynmx.c
Last active August 29, 2015 14:13
dynamic matrix in c language
#include <stdio.h>
#include <stdlib.h>
int main() {
// строк
int n = 10;
// столбцов
int m = 5;