سلام استاد
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
int a;
Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine("enter number 1 for start: ");
Console.ForegroundColor = ConsoleColor.Red;
a = Convert.ToInt32(Console.ReadLine());
Console.ResetColor();
int b;
Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine("enter number 2 : ");
Console.ForegroundColor = ConsoleColor.Red;
b = Convert.ToInt32(Console.ReadLine());
Console.ResetColor();
Console.WriteLine("1 - Start \n2 - cancel");
string c;
c = Convert.ToString(Console.ReadLine());
if (c=="1")
{
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("Started . . . \n");
Console.ResetColor();
while (a <= b)
{
Console.WriteLine(a);
a++;
}
}else
{
Console.WriteLine("Canceled, enter (enter) for exit");
Console.ReadKey();
}
//Console.WriteLine("sum is :" + (a * b));
Console.ReadKey();
}
}
}
چکار کنم که وقتی میگه استارت اول بشه
Start .
Start ..
Start ...
یعنی ادیت بشه چند ثانیه مکث کنه بعد شروع کنه؟
سلام این کارتو راه می اندازه
int a;
Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine("enter number 1 for start: ");
Console.ForegroundColor = ConsoleColor.Red;
a = Convert.ToInt32(Console.ReadLine());
Console.ResetColor();
int b;
Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine("enter number 2 : ");
Console.ForegroundColor = ConsoleColor.Red;
b = Convert.ToInt32(Console.ReadLine());
Console.ResetColor();
Console.WriteLine("1 - Start \n2 - cancel");
string c;
c = Convert.ToString(Console.ReadLine());
if (c == "1")
{
Console.ForegroundColor = ConsoleColor.Red;
//********این کد رو اضافه کنید
Console.Write("Started");
for (int i = 0; i < 3; i++)
{
System.Threading.Thread.Sleep(1000);
Console.Write(" . ");
}
Console.Write("\n");
//******************************
Console.ResetColor();
while (a <= b)
{
Console.WriteLine(a);
a++;
}
}
else
{
Console.WriteLine("Canceled, enter (enter) for exit");
Console.ReadKey();
}
Console.ReadKey();
با سپاس
سلام
چطور میتونم کاری کنم که وقتی هر | اضافه میشه 10 درصد 10 درصد اضافه بشه تا برسه به 100 میشه تیکه کدش رو بدید