Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- using System.IO;
- using System.Collections.Generic;
- namespace rim
- {
- class Program
- {
- static void Main(string[] args)
- {
- List<int> dob = new List<int>();
- int count1 = 0, count2 = 0;
- for (int i = 0; i < 10; i++)
- {
- string[] str = Console.ReadLine().Split(' ');
- for (int j = 0; j < 13; j++)
- {
- count1++;
- dob.Add(int.Parse(str[j]));
- }
- }
- dob.Sort();
- Console.WriteLine("Variation series");
- int ten = 0;
- foreach (var item in dob)
- {
- Console.Write(item + " ");
- if (++ten % 13 == 0) Console.WriteLine();
- }
- Console.WriteLine("Intervals");
- double k = dob[0];
- double last_interval = 0;
- double step = (dob.Max() - dob.Min()) / 10.0;
- Console.WriteLine($"Step is: {step}");
- int index = 0;
- int all = 0;
- for (int i = 0; i < 10; i++)
- {
- if (i == 9)
- count2 += 0;
- Console.Write($"{k:F1} - ");
- last_interval = k;
- k += step;
- int count = 0;
- while (dob[index] < k)
- {
- if (dob[index++] >= last_interval)
- count++;
- }
- all += count;
- Console.WriteLine($"{k} : {count}");
- }
- Console.WriteLine($"All:{all}");
- int mo = dob.Sum()/130;
- Console.WriteLine($"MO:{mo}");
- double d = dob.Sum(e=>Math.Pow((e-mo),2))/129;
- Console.WriteLine($"D:{d}");
- Console.ReadLine();
- }
- }
- }
- //288 284 291 268 265 280 382 290 335 353 440 353 400
- //366 338 315 384 367 328 388 348 360 409 311 336 280
- //290 335 353 400 335 300 361 360 325 345 349 307 344
- //323 360 397 379 334 399 352 349 361 385 333 377 347
- //321 359 449 356 343 391 332 375 345 358 320 342 420
- //352 368 331 373 357 339 319 309 341 335 367 375 371
- //292 356 317 340 329 334 366 383 332 354 313 328 425
- //295 355 345 339 334 365 379 349 401 367 364 386 318
- //407 381 337 289 366 369 384 347 405 360 344 336 306
- //350 369 403 346 362 326 346 340 385 419 351 356 377
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement