#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", ¬ation); 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]);
int x = int.Parse(Console.ReadLine());
double[,] mas = new double[x, x];
Console.WriteLine("Заполни матрицу");
for (int i = 0; i < x; i++) {
for (int j = 0; j < x; j++) {
mas[i, j] = double.Parse(Console.ReadLine());
}
}
for (int i = 0; i < x; i++) {
for (int j = 0; j < x; j++) {
if (mas[i, j] % 3 == 0) {
mas[i, j] = 0;
}
}
}
Console.WriteLine("Такая матрица получится");
for (int i = 0; i < x; i++) {
for (int j = 0; j < x; j++) {
Console.Write(mas[i, j]+" ");
}
Console.WriteLine();
}
Console.ReadKey();