Skip to content

Instantly share code, notes, and snippets.

View selevit's full-sized avatar

Sergey Levitin selevit

View GitHub Profile
program clock;
var
C: Integer; { часы }
M: Integer; { минуты }
S: Integer; { секунды }
NEW_C: Integer; { часы через 15 секунд }
NEW_M: Integer; { минуты через 15 секунд }
NEW_S: Integer; { секунды через 15 секунд }
#include <iostream>
using namespace std;
int main()
{
setlocale(LC_ALL, "Russian");
int mass [15];
int sr=0, j=0;
for (int i=0;i<15;i++)
{
#include <iostream>
using namespace std;
int main()
{
setlocale(LC_ALL, "Russian");
int mass [15];
int sr, j=0;
for (int i=0;i<15;i++)
{
<?php
$str = $_GET['someString'];
$resp = array(
'hash' => md5($str),
'price' => 1200,
'time' => time(),
);
header('Content-type: application/json');
@selevit
selevit / part1.pro
Created September 17, 2012 19:33
Qt Address Book Tutorial — Part 1
SOURCES = addressbook.cpp \
main.cpp
HEADERS = addressbook.h
# install
target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook/part1
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS part1.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/addressbook/part1
INSTALLS += target sources
@selevit
selevit / addressbook.cpp
Created September 17, 2012 19:26
Qt Address Book Tutorial — Part 1
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
@selevit
selevit / main.cpp
Created September 17, 2012 19:32
Qt Address Book Tutorial — Part 1
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
@selevit
selevit / addressbook.h
Created September 17, 2012 19:30
Qt Address Book Tutorial — Part 1
/****************************************************************************
**
** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
#include <iostream>
int main()
{
int x = 1;
int result = 0;
int n;
std::cout << "N = ";
std::cin >> n;
#include <iostream>
using namespace std;
long double fact(int N)
{
if(N < 0) // если пользователь ввел отрицательное число
return 0; // возвращаем ноль
if (N == 0) // если пользователь ввел ноль,
return 1; // возвращаем факториал от нуля - не удивляетесь, но это 1 =)
else // Во всех остальных случаях