Facebook
From Voluminous Dove, 4 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 207
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Lab1
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             double d;
  14.             float f;
  15.             int i;
  16.             decimal m;
  17.  
  18.             for (decimal f1 = -1; f1 < 1; f1 += 0.1m)
  19.             {
  20.                 Console.WriteLine(f1);
  21.                 if (f1 == 0)
  22.                     Console.WriteLine("zero");
  23.             }
  24.             Console.ReadLine();
  25.  
  26.  
  27.             /*
  28.             for (float f1 = -1; f1 < 1; f1+=0.1f)
  29.             {
  30.                 Console.WriteLine(f1);
  31.                 if (f1 > 0)
  32.                     Console.WriteLine("zero");
  33.             }
  34.             Console.ReadLine();*/
  35.  
  36.             /*double x = 10000000.17;
  37.             Console.WriteLine(x);
  38.             Console.ReadLine();*/
  39.  
  40.             /*double suma = 0;
  41.             for (int i = 0; i < args.Length; i++)
  42.             {
  43.                 Console.WriteLine(args[i]);
  44.                 suma += Convert.ToDouble(args[i]);
  45.             }
  46.             Console.WriteLine("suma" + suma);
  47.             Console.ReadLine();*/
  48.  
  49.  
  50.             /*
  51.             Console.Write("a=");
  52.             string sa = Console.ReadLine();
  53.             double a = Convert.ToDouble(sa);
  54.             Console.Write("b=");
  55.             string ba = Console.ReadLine();
  56.             double b = Convert.ToDouble(ba);
  57.  
  58.             double c = a + b;
  59.             string sc = c.ToString();
  60.  
  61.             Console.WriteLine("c= " + sc);
  62.             Console.ReadLine();*/
  63.  
  64.         }
  65.     }
  66. }
  67.