This file contains hidden or 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
/* | |
ПРАКТИЧНИЙ ПРОЄКТ (чернетка) | |
з дисципліни "Програмування з використанням мови C++" | |
(процедурна частина) | |
Двовимірна гра "ТЕТРІС" | |
Виконав студент гр. СПР411 |
This file contains hidden or 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
#include <iostream> | |
using namespace std; | |
void delete_element_at_the_end_of_array(int** ar, int* size) { | |
int* temp = new int[*size - 1]; | |
for (int i = 0; i < *size - 1; i++) | |
temp[i] = (*ar)[i]; | |
delete[] *ar; | |
*ar = temp; | |
--(*size); |
This file contains hidden or 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
Написать функцию, которая принимает 2 числа и возвращает -1, если первое меньше чем второе, 1 — если первое больше чем второе и 0 — если числа равны. | |
const number = function (a,b) | |
{ | |
if(a<b) return -1; | |
if(a>b) return 1; | |
return 0; | |
} | |
console.log(number(1,2)); |
This file contains hidden or 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
import React from 'react' | |
import './App.css' | |
function MyButton(props) { | |
return ( | |
<button style={{ backgroundColor: props.color }}> | |
Нажми меня | |
</button> | |
); | |
} |
This file contains hidden or 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
import React, {useState} from 'react' | |
import './App.css' | |
const getRandomColor = () => { | |
const letters = '0123456789ABCDEF'; | |
let color = '#'; | |
for (let i = 0; i < 6; i++) { | |
color += letters[Math.floor(Math.random() * 16)]; | |
} | |
return color; |
This file contains hidden or 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
import React from 'react' | |
import './App.css' | |
function MyButton() { | |
return <button>Hello</button> | |
} | |
function BorderedButton() { | |
return ( | |
<div className="bordered"> |
This file contains hidden or 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
import React, {useState} from 'react' | |
import reactLogo from './assets/react.svg' | |
import viteLogo from '/vite.svg' | |
import './App.css' | |
function MyButton() { | |
return <button>Hello</button> | |
} |
This file contains hidden or 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
// Task 1 | |
const comparer = function (a, b){ | |
if(a > b) return 1; | |
else if(a < b) return -1; | |
else return 0; | |
} | |
console.log(comparer(1, 2)); | |
// Task 2 factorial |
This file contains hidden or 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
import {useState} from 'react' | |
import reactLogo from './assets/react.svg' | |
import viteLogo from '/vite.svg' | |
import './App.css' | |
function MyButton() { | |
return <button>Hello</button> | |
} | |
function App() { |
This file contains hidden or 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
#include <iostream> | |
#include <windows.h> | |
#include <conio.h> | |
using namespace std; | |
void log_in(); | |
void main_menu(); | |
void admin(); | |
void sign_in(); | |
void admin_menu(); |