Skip to content

Instantly share code, notes, and snippets.

def factorial(c):
if(c==0):
return 1;
res=1
for i in range(2,int(c)+1):
res*=i
return res
x = int(input("Введите x:"))
while(True):
// laba3.cpp : Этот файл содержит функцию "main". Здесь начинается и заканчивается выполнение программы.
//
#include <iostream>
#include "fstream"
using namespace std;
#pragma once
#include <iostream>
using namespace std;
class Matrix
{
protected: int N = -1, M = -1; int** matrix = NULL;
int begX = -1, begY = -1, endX = -1, endY = -1;
<?php
$user_password='';
$user='root';
$data_base='qutal';
$table='db';
$host='localhost';
?>
<?php
$c1=$_POST["firstCount"];$c2=$_POST["secondCount"];$s=$_POST["sign"];
$res;
if(ctype_digit($c1) && ctype_digit($c2)){
switch ($s) {
case '+':
$res=$c1+$c2;
break;
case '-':
$res=$c1-$c2;
@qutal
qutal / index.php
Last active July 7, 2019 16:08
RomecQuest
<?php
$array = array(1, 0, 6, 9, 4, 5, 2, 3, 8, 7);$chet=0;$nechet=0;
$chetArray=array();
$nechetArray=array();
function firstMission($chet,$nechet,$array){
for($i=0;$i<count($array);$i++){
if($array[$i]%2==0){
$chet++;