If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Rate Thread | Display Modes |
#1
|
|||
|
|||
TICK NUMBERS!!!!!!!!!!
Ticks #01: 40 Ticks #02: 24 Ticks #03: 23 Ticks #04: 15 Ticks #05: 11 Ticks #06: 22 Ticks #07: 43 Ticks #08: 16 Ticks #09: 01 Ticks #10: 24 Ticks #11: 56 Ticks #12: 55 Ticks #13: 21 Ticks #14: 05 Ticks #15: 11 Ticks #16: 29 Ticks #17: 04 Ticks #18: 13 Ticks #19: 35 Press any key to continue . . . | for (i = 1; i 10; i++) { Console.WriteLine("Ticks #{0}: {1}", i.ToString("D2"), rnd.Next(1, 60).ToString("D2") ); // int ticks = rnd.Next(1, 60); } for (i = 10; i 20; i++) { Console.WriteLine("Ticks #{0}: {1}", i.ToString("D2"), rnd.Next(1, 60).ToString("D2") ); // int ticks = rnd.Next(1, 60); } | -- With over 500 million devices now running Windows 10, customer satisfaction is higher than any previous version of windows. |
Ads |
#2
|
|||
|
|||
TICK NUMBERS!!!!!!!!!!
On 06/23/2017 09:15 PM, Good Guy wrote:
for (i = 1; i 10; i++) { Console.WriteLine("Ticks #{0}: {1}", i.ToString("D2"), rnd.Next(1, 60).ToString("D2") ); // int ticks = rnd.Next(1, 60); } for (i = 10; i 20; i++) { Console.WriteLine("Ticks #{0}: {1}", i.ToString("D2"), rnd.Next(1, 60).ToString("D2") ); // int ticks = rnd.Next(1, 60); } | Hi Guy, Loops, random numbers, and formatted strings. Why did you post this? Was it in response to a question someone posted about C? -T |
#3
|
|||
|
|||
TICK NUMBERS!!!!!!!!!!
On 26/06/2017 17:11, T wrote:
On 06/23/2017 09:15 PM, Good Guy wrote: for (i = 1; i 10; i++) { Console.WriteLine("Ticks #{0}: {1}", i.ToString("D2"), rnd.Next(1, 60).ToString("D2") ); // int ticks = rnd.Next(1, 60); } for (i = 10; i 20; i++) { Console.WriteLine("Ticks #{0}: {1}", i.ToString("D2"), rnd.Next(1, 60).ToString("D2") ); // int ticks = rnd.Next(1, 60); } | Hi Guy, Loops, random numbers, and formatted strings. Why did you post this? Was it in response to a question someone posted about C? -T We get all sorts here and I can't remember what this was for. My TB keeps messages for 1 (one) day only so I don't have anything to check against!!. -- With over 500 million devices now running Windows 10, customer satisfaction is higher than any previous version of windows. |
#4
|
|||
|
|||
TICK NUMBERS!!!!!!!!!!
On 06/26/2017 09:15 AM, Good Guy wrote:
On 26/06/2017 17:11, T wrote: On 06/23/2017 09:15 PM, Good Guy wrote: for (i = 1; i 10; i++) { Console.WriteLine("Ticks #{0}: {1}", i.ToString("D2"), rnd.Next(1, 60).ToString("D2") ); // int ticks = rnd.Next(1, 60); } for (i = 10; i 20; i++) { Console.WriteLine("Ticks #{0}: {1}", i.ToString("D2"), rnd.Next(1, 60).ToString("D2") ); // int ticks = rnd.Next(1, 60); } | Hi Guy, Loops, random numbers, and formatted strings. Why did you post this? Was it in response to a question someone posted about C? -T We get all sorts here and I can't remember what this was for. My TB keeps messages for 1 (one) day only so I don't have anything to check against!!. Well, the code sure was pretty. It was a good example of formatted strings. Very easy to understand. |
#5
|
|||
|
|||
TICK NUMBERS!!!!!!!!!!
On 06/26/2017 09:19 AM, T wrote:
On 06/26/2017 09:15 AM, Good Guy wrote: On 26/06/2017 17:11, T wrote: On 06/23/2017 09:15 PM, Good Guy wrote: for (i = 1; i 10; i++) { Console.WriteLine("Ticks #{0}: {1}", i.ToString("D2"), rnd.Next(1, 60).ToString("D2") ); // int ticks = rnd.Next(1, 60); } for (i = 10; i 20; i++) { Console.WriteLine("Ticks #{0}: {1}", i.ToString("D2"), rnd.Next(1, 60).ToString("D2") ); // int ticks = rnd.Next(1, 60); } | Hi Guy, Loops, random numbers, and formatted strings. Why did you post this? Was it in response to a question someone posted about C? -T We get all sorts here and I can't remember what this was for. My TB keeps messages for 1 (one) day only so I don't have anything to check against!!. Well, the code sure was pretty. It was a good example of formatted strings. Very easy to understand. "C" gives me a migraine. I usually do my heavy coding in Perl 6. Sometimes Perl 5, if the modules haven't been fully ported to 6. Perl can be made into a write only language if you are not careful. A lot of programmers use stream of conscience, making their code devilishly difficult to understand. And the try to cram as much on one line as possible to prove they can do it. Making it worse to understand. Perl is really bad for this. I was just admiring your easy to read layout. I use "top down", which makes my code very easy to understand. (I comes from a Modula 2 background.) |
#6
|
|||
|
|||
TICK NUMBERS!!!!!!!!!!
T wrote:
On 06/23/2017 09:15 PM, Good Guy wrote: for (i = 1; i 10; i++) { Console.WriteLine("Ticks #{0}: {1}", i.ToString("D2"), rnd.Next(1, 60).ToString("D2") ); // int ticks = rnd.Next(1, 60); } for (i = 10; i 20; i++) { Console.WriteLine("Ticks #{0}: {1}", i.ToString("D2"), rnd.Next(1, 60).ToString("D2") ); // int ticks = rnd.Next(1, 60); } | Hi Guy, Loops, random numbers, and formatted strings. Why did you post this? Was it in response to a question someone posted about C? -T I think the languages used could be C# which is otherwise known as "C sharp". https://en.wikipedia.org/wiki/C_Shar...mming_language) Paul |
#7
|
|||
|
|||
TICK NUMBERS!!!!!!!!!!
On 06/26/2017 09:31 AM, Paul wrote:
T wrote: On 06/23/2017 09:15 PM, Good Guy wrote: for (i = 1; i 10; i++) { Console.WriteLine("Ticks #{0}: {1}", i.ToString("D2"), rnd.Next(1, 60).ToString("D2") ); // int ticks = rnd.Next(1, 60); } for (i = 10; i 20; i++) { Console.WriteLine("Ticks #{0}: {1}", i.ToString("D2"), rnd.Next(1, 60).ToString("D2") ); // int ticks = rnd.Next(1, 60); } | Hi Guy, Loops, random numbers, and formatted strings. Why did you post this? Was it in response to a question someone posted about C? -T I think the languages used could be C# which is otherwise known as "C sharp". https://en.wikipedia.org/wiki/C_Shar...mming_language) Paul "C" gives me a migraine. This does look a little too elegant for C |
Thread Tools | |
Display Modes | Rate This Thread |
|
|