Не могу найти ошиьку, помогите с++
#include "stdafx.h"
#include
#include "conio.h"
#include
#include
class mun
{
private:
int first;
int second;
public:
void init(int a, int b)
{
setlocale(LC_ALL,"Russian");
if(b==0)
{
printf("Введите другое число не равное 0!\n");
scanf("%i", &b);
}
first=a;
second=b;
}
void Read()
{
setlocale(LC_ALL,"Russian");
printf("Введите число first\n");
scanf("%i", &first);
printf("Введите число second\n");
scanf("%i", &second);
init(first, second);
}
float Ipart()
{
return (first/second);
}
void Display()
{
setlocale(LC_ALL,"Russian");
printf("Целая часть=""%i",(first/second));
}
};
int _tmain(int argc, _TCHAR* argv[])
{
setlocale(LC_ALL,"Russian");
mun d;
char a;
printf("Вы хотите ввести числа? Y/N\n");
scanf("%c", &a);
switch(a)
{
case 'Y' :
{
d.Read();
printf("Вы хотите узнать целую часть? Y/N\n");
scanf("%c", &a);
}
switch(a)
{
case 'Y':
{
d.Ipart();
printf("Вывести число на экран? Y/N\n");
scanf("%c", &a);
}
switch(a)
{
case 'Y':
{
d.Display();
printf("\n""Закончить программу? Y/N\n");
scanf("%c", &a);
}
switch(a)
{
case 'Y':
return 0;
case 'N':
getch();
}
case 'N':
{
printf("Закончить программу? Y/N\n");
scanf("%c", &a);
}
switch(a)
{
case 'Y':
return 0;
case 'N':
getch();
}
}
case 'N':printf("Закончить программу? Y/N\n");
scanf("%c", &a);
switch(a)
{
case 'Y':
return 0;
case 'N':
getch();
}
}
case 'N':printf("Закончить программу? Y/N\n");
scanf("%c", &a);
switch(a)
{
case 'Y':
return 0;
case 'N':
getch();
}
}
getch();
return 0;
}