• Нужно сделать программу на CodeBlocks

    Дано число в десятичной системе счисления, нужно пересевти его в другую систему, которую вводишь с клавиатуры.

Ответы 1

  • #include <stdio.h>#include <conio.h>int main() {    int number, notation, z;    int i, k=0;    int A[100];    printf("Enter the number:   ");    scanf("%d",&number);    printf("Enter the notation:   ");    scanf("%d", &notation);    while (number>=notation)    {        A[k]=number%notation;        number=number/notation;        z=number;        k++;    }    printf("Number %d v notation %d =%d", number, notation,z);    for (i=k-1;i>=0;i--)        printf("%d", A[i]);    return 0;}
  • Добавить свой ответ

Войти через Google

или

Забыли пароль?

У меня нет аккаунта, я хочу Зарегистрироваться

How much to ban the user?
1 hour 1 day 100 years