CD это отражения ямок и горок которые кодируются 1 и 0| а различия в cd инфрокрасный лазер а в dvd красный лазер и в dvd меньшая длинна волны ёмкость DVD превосходит обычный cd
Число 512 в шестнадцатеричной системе счисления (HEX): 000200.
using System;
using System.Collections.Generic;
namespace App {
internal class Program {
private static void Main() {
Console.Write("Сколько элементов будем вводить? n = ");
var n = Convert.ToInt32(Console.ReadLine());
var a = new List<int>();
for (var i = 0; i < n; i++) {
Console.Write("Элемент номер {0} = ", i);
a.Add(Convert.ToInt32(Console.ReadLine()));
}
Console.WriteLine("Среднеарифметическое = {0}", Average(a));
Console.ReadKey();
}
public static double Average(List<int> a) {
var sum = 0.0;
foreach (var t in a) {
sum += t;
}
return sum / a.Count;
}
}
}
#include<iostream>
using namespace std;
int main(){
int l,v1,v2,t;
cin>>l>>v1>>v2>>t;
int x1 = (t * v1)%l,x2 = (-t*v2)%l;
if(x1<0) x1=l-x1;
if(x2<0) x2=l+x2;
cout<<min(abs(x1-x2),abs(l-x1-x2));
}