Hi
I am trying to increment a number by 40 and immidiatly decrementing it by 29. in a number range of 1 to 100 in circularly. the process need to be repete repetedly in circular motion (one increment and one decrement , to and fro) for a "x" no of times . the result should be displayed in a sequence.
Can you please help me in solving this
Jignesh TrivediPosted Jan 24, 2013, 7:36 AM
correct me.
You required some process that repeat and display in line.
Console.WriteLine("How many time you want to repeat process");
int tried = Convert.ToInt32(Console.ReadLine());
for (int c = 0; c < tried; c++)
{
Console.WriteLine("Enter the number");
int enterNumber = Convert.ToInt32(Console.ReadLine());
Console.WriteLine(enterNumber + 40);
Console.WriteLine(enterNumber - 29);
}
hope this will help.