Tag: tutorials
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…
How to check the Equality of Anonymous Types in C#?
The Equals method is used to check the equality. The anonymous types will be equal of it has the same order, type, name and values. How to check the Equality of Anonymous Types in C#? Below is a sample sourcecode demonstrating how to check the Equality of Anonymous types in c#.
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.
How to Compare two arrays in Java ?
You can compare arrays in java using the Array.deepEquals() method . The Array.deepEquals() method in Java lets the developers to compare array objects and return true if both the arrays contains the same objects. How to Compare two arrays in Java ? Below is a sample code snippet demonstrating the usage of Array.deepEquals() to compare two arrays. Output Comparing input and input2————————–trueComparing input and input3————————–false
How to Check if Integer is a multiple of a number in Java?
If you want to check if the integer value is a multiple of a number in Java , you can use the modulus (%) operator . If you get the result as zero , then it is considered as multiple of a number. How to Check if Integer is a multiple of a number in Java? Below is a sample code snippet demonstrating the usage…
VB.NET Program to display "Hello, World!"
Problem Write a program in VB.NET to display “Hello, World!” on the screen. VB.NET Program to display “Hello, World!” in Console Window. This is a simple VB.NET program that displays “Hello, World!” on the console window. Output Hello, World! In the above program , Main() is the starting point for the program and the Console.WriteLine function is used to display the string on the Console…
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…
How to append an array to another in JavaScript ?
In JavaScript , you may want to append one array to another array(s) to combine their elements resulting in to a single array. How to append an array to another in JavaScript ? You can use the concat method of JavaScript to achieve the same. Below is a sample code snippet demonstrating the usage of the concat method of array in JavaScript to combine multiple…
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 find the ASCII Value of a Character
Problem Write a program in Visual C# to find the ASCII value of the input character. How to find the ASCII value of a character in C# ? Output Abundantcode.com coding sample Enter a character : A 65
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…
Java – How to declare Hexadecimal literal ?
Problem statement You need to declare an Hexadecimal literal in Java and display the result on a console window. Solution Hexadecimal numbers can contain numbers from 0-9 as well as characters A-F where A-F represents 10-15. You can prefix the numbers with 0X to denote it as hexa decimal number as shown below. The output of the above program will be 10 21