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;
- namespace Console
- {
- class Program
- {
- static unsafe void Main(string[] args)
- {
- double* x = stackalloc double[10];
- double* y = stackalloc double[10];
- double* m = stackalloc double[10];
- double* b = stackalloc double[10];
- for (int i = 0; i < 10; i++)
- {
- b[i] = Next();
- m[i] = Next();
- x[i] = Next();
- y[i] = (m[i] * x[i]) + b[i];
- Console.WriteLine("Rise (y) = {0}, Run (x) = {1}", y[i], x[i]);
- }
- Console.ReadKey(true);
- }
- static unsafe int Next()
- {
- return (new Random()).Next(0, 32);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement