Posts

Showing posts from January, 2023

General C# Programs for Beginners

Posted by Libin Antony on 17-01-2023   General C# Programs for Beginners In this blog we are going to discuss about the basic C# Programming., Below are the some of the programs we are going to discuss. C# Programs are as similar to javascript programming, some keywords are different from Java script. Solved C# Program Question-Answer follows after the questions. Program-1 Input a code [C|S|V] and a character .Then find a)if the code is ’C’ then find the character is capital or not b)if the code is ‘S’ then find the character is small or not c)if the code is ‘V’ then find the character is vowel or not Program-2: Check Given Number is Prime or not using C#. Program-3: Swap First and Last Elements of the Given Array Program-4 Design a program to Input a Number. Check if it is a positive three digit number or not Program-5 Write a Program to input the height of two students. Print the height of the tallest person Program-6 Input a code [a/b/c] and two numbers a)Code is a ,then pr

C# Program to Find a Year Leap or not & Find odd or Even Number

Image
Posted by Libin Antony on 13/01/2023   Just sharing the C# Programs and O/P s for your reference. Kindly discuss, if any contradictions. C# Program to Find a Year Leap or not : Program:   using System; namespace Leapyearornot {     class Leapyear     {         static void Main( string [] args)         {             Console.WriteLine( "Enter Year:" );             int year = Convert.ToInt32(Console.ReadLine());             if ((year % 4 == 0) && (year % 100 != 0 || year % 400 == 0))             {                 Console.WriteLine(year + "is a leap year" );             }             else             {                 Console.WriteLine(year + "is not a leap year" );             }         }     } OUTPUT: C# Program to Find a Number odd or Even Number: Program: using System; namespace oddoreven {     class oddeven     {         static void Main( string [] args)           {             Conso