i want a program in c# for 100 or for a number greater
than 100.....pls help



i want a program in c# for 100 or for a number greater than 100.....pls help..

Answer / Sachin Singh Yadav

Here's a simple C# example of a program that prints numbers from 1 to 100:

```csharp
using System;

namespace NumberCounter
{
class Program
{
static void Main(string[] args)
{
for (int i = 1; i <= 100; i++)
{
Console.WriteLine(i);
}
}
}
}
```

To modify the program to print numbers greater than 100, you can simply change the loop condition from `i <= 100` to a variable or input that holds the desired end value.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Engineering AllOther Interview Questions

what are the different types of database servers

1 Answers   IBM,


How to make shoppingcart appliction using array?and how to unset session variable and when?

0 Answers  


plz explain abt refrigeration r22 bitzer comprassors trouble shooting and maintenance

1 Answers  


Why the secondary ip address of interface is not advertising in IGP cloud?

2 Answers   HCL,


A code which had some declarations of some data items. There were a couple of normal data items(char,int..) and some pointers as well and a malloc call. You have to find the total memory taken up in the stack(Hint:Pointers and all are allocated in heap, not in stack, so dont count them).Also in most of these questions, they were specifying that the OS was 32 bit

1 Answers   Syntel,


is there increase in the pressure of water or the density of water if we go deep into the ocean.(but the density of water is 1000kg/cubic meter)?

1 Answers  


If you are using C language to implement the heterogeneous linked list, what pointer type will you use?

3 Answers   TCS,


what are register variables?what are the advantages of using register variables in c language?

1 Answers  


hi my name is ashok i have 55 per and 2 backlogs and one year left may i get above 60 pr

1 Answers  


I m doing btech with computerscience branch.For every campus placement eligibilty criteriais is 60%.I have 65% in highschool and b.tech till now but secured 59.6% in intermediate. So would this percentage b considered as 60% or i wont b able to sit in exams?kindly post your views?

2 Answers   TCS,


What is the difference between buzzer,hooter & bell placed on annunciation panels ?

1 Answers   Stelmec,


what are enumerations in c language?

1 Answers  


Categories
  • Civil Engineering Interview Questions Civil Engineering (5086)
  • Mechanical Engineering Interview Questions Mechanical Engineering (4453)
  • Electrical Engineering Interview Questions Electrical Engineering (16638)
  • Electronics Communications Interview Questions Electronics Communications (3918)
  • Chemical Engineering Interview Questions Chemical Engineering (1095)
  • Aeronautical Engineering Interview Questions Aeronautical Engineering (239)
  • Bio Engineering Interview Questions Bio Engineering (96)
  • Metallurgy Interview Questions Metallurgy (361)
  • Industrial Engineering Interview Questions Industrial Engineering (259)
  • Instrumentation Interview Questions Instrumentation (3014)
  • Automobile Engineering Interview Questions Automobile Engineering (332)
  • Mechatronics Engineering Interview Questions Mechatronics Engineering (97)
  • Marine Engineering Interview Questions Marine Engineering (124)
  • Power Plant Engineering Interview Questions Power Plant Engineering (172)
  • Textile Engineering Interview Questions Textile Engineering (575)
  • Production Engineering Interview Questions Production Engineering (25)
  • Satellite Systems Engineering Interview Questions Satellite Systems Engineering (106)
  • Engineering AllOther Interview Questions Engineering AllOther (1379)