// Write the programs to print the even numbers between 1 to 100.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace evennum
{
class Program
{
static void Main(string[] args)
{
int n ;
{
Console.WriteLine("the even numbers between 1 to 100 are :");
for (n = 1; n <= 100; n++)
if(n%2==0)
//while (n <= 100)
Console.WriteLine(n);
Console.ReadKey();
}
}
}
}
Monday, 28 January 2013
Sunday, 27 January 2013
//Write a program to find the biggest number in n numbers without using arrays.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace biggestnumber
{
class Program
{
static void Main(string[] args)
{
int ntimes = 0,biggest_number=0,num=0;
Console.Write("How many times you want to enter the number : ");
ntimes = int.Parse(Console.ReadLine());
for (int i = 1; i <= ntimes; i++)
{
Console.Write("Enter {0} Number ",i);
num = int.Parse(Console.ReadLine());
if (biggest_number< num)
biggest_number = num;
}
Console.WriteLine();
Console.WriteLine("The biggest Number : " + biggest_number);
Console.ReadKey();
} } }
//Write a program to take as input a number n and find the sum of all numbers from 1 to n.
//Eg. If input is 6 then output should be 1+2+3+4+5+6 = 21
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace addtwonos
{
class Program
{
static void Main(string[] args)
{
int n = 0, total = 0, temp = 0;
Console.Write("Enter the n number : ");
n = int.Parse(Console.ReadLine());
for (int i = 1; i <= n; i++)
{
Console.Write("Enter the {0} number ", i);
temp = int.Parse(Console.ReadLine());
total = total + temp;
}
Console.WriteLine("The total of a number u entered is : " + total);
//total = Int32.Parse(Console.ReadLine());
Console.ReadKey();
}
}
}
Friday, 25 January 2013
Busy day....
Today it was quite a busy day for me. I did some basic programs with the help of mindqjobs.com site.
Practising basic programs has now become a regular activity for me.Since m in a training period i need to go on learning and try new things. The other half day i kept myself busy in watching educational videos and learn something interesting like Web Services.
Thursday, 24 January 2013
End of the day !!
Today it was quite hectic day watching educational videos and doing the basic programs. There are so many videos m confused about which video should i watch as a fresher/beginner.
Today's task...
Our four task for today are
!. To create a spread sheet
2. To post something on the blog.
3. To perform at least 25 basic c# programs.
4. To watch the educational videos to learn visual studio.net
Out of these these first two task are already completed and now we will do the remaining two by the end of the day.
Subscribe to:
Posts (Atom)