Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
16
Добавлен:
17.04.2013
Размер:
471 б
Скачать
// grayrat4.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "iostream.h"
void main(void)
{   int x,i;
	char  ar[13];
	for(i=0;i<13;i++)
     ar[i]=0;

for(i=0;i<20;i++)
{	

cin>>x;

if ((x<10)||(x>100)) 
{
 cout<<"chislo doljno bit` 10-100";
 break;
}

if ((( ar[int((x-10)/8)])&(1<<int((x-10)%8)))==0) cout<<x<<endl;;

ar[int((x-10)/8)]=(ar[int((x-10)/8)]) | (1<<int((x-10)%8));
};

cin>>x;

}

Соседние файлы в папке ООП_ЭТМО