0
How to invert this so that the result shows backwards?
using System; using System.Collections.Generic; namespace SoloLearn { class Program { static void Main(string[] args) { int number = Convert.ToInt32(Console.ReadLine()); while(number>0){ if(number%3==0) { Console.Write("*"); } else { Console.Write(number); } number--; } } } }
4 Respostas
+ 2
using System;
using System.Collections.Generic;
namespace SoloLearn
{
class Program
{
static void Main(string[] args)
{
int number = Convert.ToInt32(Console.ReadLine());
int i = 1;
while (i<=number) {
if (i%3==0) {
Console.WriteLine("*");
} else {
Console.WriteLine(i);
}
}
}
}
}
0
The result shows 7*54*21. I want it to show 12*45*7.
0
Wow it was kinda obvious. Makes me feel dumb. Thanks a lot though.
0
You're welcome