Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace ConsoleApp13
- {
- class Program
- {
- public static string[] nums;
- static string GetCPlusPlusSimpleCode(int mode, string[] parameters)
- {
- int m = mode;
- string[] p = parameters;
- string ret = "";
- //int a = 1;
- if (m == 1)
- {
- //Две линейные функции
- string s = String.Format("{0} {1} {2} {3} {4} {5} {6} {7}", p);
- Console.WriteLine(s);
- Console.ReadKey();
- }
- if (m == 2)
- {
- //Сумма двух линейных функций
- Console.WriteLine(s);
- Console.ReadKey();
- }
- if (m == 3)
- {
- //Арифметическая прогрессия
- Console.WriteLine(s);
- Console.ReadKey();
- }
- else
- {
- Console.WriteLine("Неудача");
- Console.ReadKey();
- }
- return ret;
- }
- static string GetParametersForSimpleCode(int mode)
- {
- int m = mode;
- string ret = "";
- if (m == 1)
- {
- //Две линейные функции
- nums = new string[] { "1", "0", "<=", "100", "+", "30", "*", "2" };
- }
- if (m == 2)
- {
- //Сумма двух линейных функций
- }
- if (m == 3)
- {
- //Арифметическая прогрессия
- }
- else
- {
- Console.WriteLine("Неудача");
- Console.ReadKey();
- }
- return ret;
- }
- static void Main(string[] args)
- {
- GetParametersForSimpleCode(1);
- string a = GetCPlusPlusSimpleCode(1, nums);
- Console.WriteLine(a);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement