This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// laba3.cpp : Этот файл содержит функцию "main". Здесь начинается и заканчивается выполнение программы. | |
// | |
#include <iostream> | |
#include "fstream" | |
using namespace std; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$user_password=''; | |
$user='root'; | |
$data_base='qutal'; | |
$table='db'; | |
$host='localhost'; | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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++; |