#include <iostream>
using namespace std;
int main()
{
int YBorn , YNow ;
cout <<"what year where you born in?"<<endl;
cin >>YBorn;
cout <<"what year is it now?"<<endl;
cin >>YNow;
int YOld=YNow-YBorn;
cout<<"at the end of the year:"<<endl;
cout << "you're " <<YOld << " years old"<<endl;
int MOld = YOld*12;
cout<< "and "<<MOld<<" month old"<<endl;
int DOld=YNow/4-YBorn/4+YOld*365;
cout<<"and "<<DOld<<" days old"<<endl;
int HOld=DOld*24;
cout<<"and "<<HOld<<" hours old"<<endl;
int MinOld=HOld*60;
cout<<"and "<<MinOld<<" minutes old"<<endl;
int SOld=MinOld*60;
cout<<"and "<<SOld<<" seconds old"<<endl;
cout<<"and "<<SOld<<"000 miliseconds old"<<endl;
system("pause");
return 0;
}
#include <iostream> //подключаем библиотеки
using namespace std; //пространство имён
int main() {
setlocale(LC_ALL, "Russian");
int tableInt; //последовательность
int x; //икс :)
bool ZaB = true; //бул для красоты
cout << "Введите переменную X: "; cin >> x; //просим X
cout << "Введите последовательность через пробел: "; //последовательность
while(cin >> tableInt) //цикл
{
if(ZaB) //для красоты
{
cout << "Результат: ";
ZaB = false;
}
if(tableInt != 0 && tableInt > x) //вывод того, что больше
{
cout << tableInt << " "; //если ноль, то конец!
}else if(tableInt == 0)
{
break;
}
}
return 0; //возращаем ничего
}