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;
- namespace ConsoleApplication1
- {
- class Program
- {
- static void Main(string[] args)
- {
- string eingabe;
- double drehzahl, deltan, sollwert, abweichung;
- //sollwert **********************
- Console.Write("\t Drehzahlsollwert in 1/min?");
- eingabe = Console.ReadLine();
- sollwert = Convert.ToDouble(eingabe);
- //istdrehzahl******************
- Console.Write("\t Istdrehzahl in 1/min?");
- eingabe = Console.ReadLine();
- drehzahl = Convert.ToDouble(eingabe);
- //delta n **********************
- Console.Write("\t Delta_N in 1/min?");
- eingabe = Console.ReadLine();
- deltan = Convert.ToDouble(eingabe);
- abweichung = sollwert - drehzahl;
- if (abweichung<0)
- {
- abweichung=abweichung * -1
- }
- if(abweichung<deltan)
- {
- Console.WriteLine("\n Grüner Bereich“");
- }
- if (abweichung <= deltan*2)
- {
- Console.WriteLine("\n Gelber Bereich“");
- }
- if (abweichung>deltan*2)
- {
- Console.WriteLine("\n Roter Bereich“");
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment