String Shortten(String text) {
return text.Length <= 6 ? text : text.Substring(0, 3) + "...";
}
Posted 10 October 2012 - 21:56
_aLfa_, on 10 October 2012 - 17:15, said:
String Shortten(String text) {
return text.Length <= 6 ? text : text.Substring(0, 3) + "...";
}
Posted 10 October 2012 - 22:26
MrA, on 10 October 2012 - 21:56, said:
Posted 11 October 2012 - 01:24
Dr_Asik, on 02 October 2012 - 20:40, said:

Posted 11 October 2012 - 02:31
Pon, on 11 October 2012 - 01:24, said:
Posted 12 October 2012 - 19:06
MrA, on 10 October 2012 - 21:56, said:
Posted 12 October 2012 - 20:04
Aethec, on 12 October 2012 - 19:06, said:
Posted 13 October 2012 - 06:33
neufuse, on 12 October 2012 - 20:04, said:
Posted 13 October 2012 - 08:12
MrA, on 13 October 2012 - 06:33, said:
Posted 13 October 2012 - 10:09
MrA said:
Posted 14 October 2012 - 03:03
Posted 14 October 2012 - 11:54
Coolicer, on 29 September 2012 - 22:27, said:
A, B = B, ABut still, internally I'm sure a temporary variable(s!) is being used.
void FizzBuzz()
{
for (int num = 1; num < 101; num ++)
{
bool multiple = false;
if (num % 3 == 0)
{
cout << "Fizz";
multiple = true;
}
if (num % 5 == 0)
{
cout << "Buzz";
multiple = true;
}
if (!multiple)
cout << num;
cout << endl;
}
}
void FizzBuzz()
{
for (int num = 1; num < 101; num ++)
{
if (num % 3 == 0)
{
cout << "Fizz";
}
else if (num % 5 == 0)
{
cout << "Buzz";
}
else
cout << num;
cout << endl;
}
}
Posted 14 October 2012 - 15:23
Hardcore Til I Die, on 14 October 2012 - 11:54, said:
Posted 14 October 2012 - 22:02
Hardcore Til I Die, on 14 October 2012 - 11:54, said:
void FizzBuzz()
{
for (int num = 1; num < 101; num ++)
{
if (num % 3 == 0)
{
cout << "Fizz";
}
else if (num % 5 == 0)
{
cout << "Buzz";
}
else
cout << num;
cout << endl;
}
}