Tag: C# programs

C Program to print a Half Pyramid using *

Problem Write a program in C to print Half pyramid using * as shown. * * * * * * * * * * * * * * * How to create and display Half Pyramid pattern in C ? Output Abundantcode.com Coding samples Enter the total number of rows: 5 * * * * * * * * * * * * * *…

C Program to find the factorial of a number using Recursive function

Problem Write a program in C to find the factorial of a number using recursion and display the result. How to find the factorial of a number using recursion in C ? The Formula to find the factorial of a number (n) is (n!) = 1*2*3*4….n Here’s a C program to demonstrate this. Output Abundantcode.com Coding samples Enter a Number : 5 Factorial of 5…

C Program to find if the input character is an Alphabet or not

Problem Write a program in C to check whether the character that was entered by the user is a alphabet or not. How to find if the input character is an alphabet or not in C ? Output Abundantcode.com Coding sample                                               Please enter a character: A                                              A is an alphabet.

C Program to find if the input is a Armstrong Number or Not

Problem Write a program in C to find if a given number is Armstrong number or not. How to check if a number is a Armstrong number or not in C programming Language ? A given number is a Armstrong number of order n if abc… = an + bn + cn + … For example , 371 is a Armstrong number because the result…

C Program to calculate the power of a number

Problem Write a program in C to calculate and display the power of a number. How to calculate the power of a number in C ? Output Abundantcode.com coding sample                                               Enter the base number: 2                                         Enter an exponent: 3                                              Answer = 6

C Program to display full pyramid using numbers

Problem Write a program in C to print full pyramid using numbers as shown below.The program should take the number of rows as input.          1       2 3 2     3 4 5 4 3   4 5 6 7 6 5 4 How to create and  display full pyramid pattern in C using numbers ? Output Abundantcode.com coding samples Enter the limit: 4…

C Program to find if the given number is a Strong Number or not.

Problem Statement You need to write a program in C to find if the given number is a strong number or not. How to find if the given number is a strong number ? What is a strong number ? A number is said to be a strong number when the sum of the factorial of a number’s individual digits are equal to the number…

C Program to find if the Given year is a Leap Year or Not

Problem Write a program in C to check whether a year entered by the user is a leap year or not. How to find if the given Year is a Leap Year or Not in C ? If the Year is divisible exactly by 4 , then it is a Leap Year. Additionally for the century years that ends with 00 , it is a…

C Program to compare arrays

Problem Statement You need to write a program in C to compare two arrays of characters and display if they are equal or not. How to compare two arrays in C ?

C# Program to display "Hello, World!"

Problem Write a program in C# to display “Hello, World!” on the screen. C# Program to display “Hello, World!” in Console Window. This is a simple C# program that displays “Hello, World!” on the console window. Output Hello, World!