using System; class program { public static void Main() { int ndays, year, week, days, DAYSINWEEK=7; Console.WriteLi...
Read More
Home / Archive for January 2016
C# Program to Count Lines in a String
using System; using System.Text.RegularExpressions; class Program { static void Main() { long a = countstring("This is ...
Read More
Write code to print the words in reverse in given string without using any inbuilt functions. Not the entire string, only words in the given string should reverse.
static void Main(string[] args) { string text = "This is Mbox tuts"; //Input string is "This is Mbox tuts" Console.Wr...
Read More
C# Program to calculate the length of the string
using System; class Program { static void Main() { string s1 = "Computer"; Console.WriteLine("The Le...
Read More
C# Number Guessing Game Let's try...
C# Number Guessing Game using System; using System.Collections.Generic; using System.Text; class Program { static void Main(string[] a...
Read More
C# number gussing game
using System; using System.Collections.Generic; using System.Text; class Program { static void Main(string[] args) { ...
Read More
C# Program to Demonstrate Tower Of Hanoi
using System; class TowerOfHanoi { int m_numdiscs; public TowerOfHanoi() { numdiscs = 0; } public TowerOfHanoi(i...
Read More
C# Program to Reverse an Array
using System; class Program { static void Main() { int[] array = { 1, 2, 3,4,5,6,7,8,9,10 }; foreach (int a in array) { Console.WriteLi...
Read More
C# Program to Accept a Number from the user and Display it if it is Positive
using System; class program { public static void Main(string[] args) { Console.WriteLine("Enter a number: "); int number = Conv...
Read More
C# Program to Convert Digits to Words
using System; public class ConvertDigitsToWords { public static void Main() { int num; int nextdigit; int numdigits; int[] n = ...
Read More
C# Program to Display All the Prime Numbers Between 1 to 100
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace PrimeNumber { class Program { static void Ma...
Read More
C# Program to Print a Diamond Using Nested Loop
C# Program to Print a Diamond Using Nested Loop using System; class program { public static void Main() { int number, i, k,...
Read More
C# Program to Sort a List of Names in Alphabetical Order
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { class Program { ...
Read More
C# Program to Display Numbers in the form of Triangle
using System; class Pascal { public static void Main() { int[,] arr = new int[8, 8]; for (int i = 0; i < 8; i++) { for (int k = 7; k ...
Read More
C# Program to Find the Frequency of the Word ʺtheʺ in a given Sentence
using System; class program { public static void Main() { string s1; Console.WriteLine("Enter the String : "); s1 = Console....
Read More
C# Program to Print a Diamond Using Nested Loop
using System; class program { public static void Main() { int number, i, k, count = 1; Console.Write("Enter nu...
Read More
C# Program to Display the ATM Transaction
This C# Program Displays the ATM Transaction. Here The types of ATM transaction are 1) Balance checking 2) Cash withdrawal 3) Cash depositio...
Read More
.Net Framework Interview Questions
What is the .NET Framework? The .NET Framework is a set of technologies that form an integral part of the .NET Platform. It is Microsoft...
Read More
C# Program to Get a Number and Display the Number with its Reverse
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Program { class Program { static void ...
Read More
C# Program to Print a BinaryTriangle
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Program { class Program { public static...
Read More
C# Program to Count number of Vowels and consonants from a given String
using System; class program { public static void Main() { char[] sentence = new char[100]; int i, vowels = 0, consonants = 0, special = 0, n...
Read More
C# Program to Count the Number of 1’s in the Entered Number
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication16 { class Program { stat...
Read More
C# Program to Check Whether the Entered Year is a Leap Year or Not
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Program { class leapyear ...
Read More
C# Program to Read a String and find the Sum of all Digits in the String
using System; class program { public static void Main() { char[] string1 = new char[20]; int count, nc = 0, sum = 0...
Read More
C# OOPs interview questions and answers
1. What is OOPS? OOPS is abbreviated as Object Oriented Programming system in which programs are considered as a collection of objects. E...
Read More
Subscribe to:
Posts
(
Atom
)