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.Net;
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Navigation;
- using Microsoft.Phone.Controls;
- using Microsoft.Phone.Shell;
- using System.Diagnostics;
- using System.Threading;
- namespace testy_wp
- {
- public partial class Test1 : PhoneApplicationPage
- {
- public Test1()
- {
- Stopwatch stopwatch = new Stopwatch();
- stopwatch.Start();
- double pi = 0;
- for (int i = 1; i < 1000000000; i += 4)
- {
- pi += 8.0 / (i * (i + 2L));
- }
- stopwatch.Stop();
- WynikTest1.Text = (pi + stopwatch.Elapsed.TotalMilliseconds.ToString() + " zajęło ");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement