Почему не работает код? - C# (185575)
Формулировка задачи:
Подскажите пожалуйста почему не работает код. Зарание благодарю.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
#include <stdio.h>
namespace kalculator
{
class Program
{
static void Main(string[] args)
{
int znak;
int a, b, c, d;
do
{
printf ("vvedite 1-i argument\n");
scanf ("%c", &a);
if (a > 32767) printf("nedopustimoe znachenie");
if (a < -3276) printf("nedopustimoe znachenie");
printf ("vvedite operacin\n");
scanf ("%c", &znak);
printf("vvedite 2-i argument\n");
scanf ("%d", &b);
if (b > 32767) printf("nedopustimoe znachenie");
if (b < -32768) printf("nedopustimoe znachenie");
switch (znak)
{
case '+':
{
c = a + b;
break;
}
case '-':
{
c = a - b;
break;
}
case '*':
{
c = a * b;
break;
}
case '/':
{
c = a / b;
d = a % b;
break;
}
}
if (c > 32767) printf("nedopustimoe znachenie");
if (c < -32768) printf("nedopustimoe znachenie");
printf("resultat\n %d\n", c);
if (znak == '/') printf("ostatok \n %\n", d);
printf("dlya vychisleniy nagmite n\n");
}
while ('r' == 'n');
}
private static void printf(string v)
{
throw new NotImplementedException();
}
private static unsafe void scanf(string v1, int* v2);
}
}Решение задачи: «Почему не работает код?»
textual
Листинг программы
private static void printf(string v)
{
Console.WriteLine(v);
}