Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Diagnostics;
- using System.Threading;
- namespace ConsoleApplication1
- {
- class Program
- {
- static void Main(string[] args)
- {
- int i;
- double a, b, p, d;
- Console.Write("Írd be az alsó határt: ");
- a = Convert.ToDouble(Console.ReadLine());
- Console.Write("Írd be a felső határt: ");
- b = Convert.ToDouble(Console.ReadLine());
- Console.Write("Hány részre szeretnéd osztani? ");
- int n = Convert.ToInt32(Console.ReadLine());
- for (i = 0, p=a, d=(b-a)/n; i <= n; i++, p+=d)
- {
- Console.WriteLine("{0,8:0.00} ", p);
- }
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement