Tag: C# programs

C Program to find the G.C.D of a number using Recursive function

Problem Write a program in C to find the find the G.C.D of a number using recursion and display the result. How to find the G.C.D of a number using recursion in C ?   Output Abundantcode.com Coding samples        Enter the first number: 8          Enter the second number: 4      G.C.D of 8 and 4 is 4.

C Program to display the characters from A to Z

Problem Write a program in C to display all the characters from A to Z using Loop constructs. How to display Characters from A to Z using C Programming Language ? Output Abundantcode.com programming sample A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

C Program to compute Quotient and Remainder

Problem Write a program in C to calculate the quotient and remainder and display it on the screen. How to compute quotient and remainder in C ? Output Enter dividend: 8                                      Enter divisor: 3                                   Quotient = 2                                          Remainder = 2

C Program to display Prime Numbers between two numbers

Problem Write a program in C to display all the prime numbers between a range of 2 numbers. How to display prime numbers between a range of 2 numbers in C ? Output Abundantcode.com coding sample   Enter Lower limit :5 Enter Upper limit :20       Prime numbers between 5 and 20 : 5 7 11 13 17 19

C Program to generate multiplication table

Problem Write a program in C to generate a multiplication table of a number entered by the user. How to generate a multiplication table for a input number in C ? Here’s a program that takes an input from the user and generates a multiplication table for it up to 10. Output Abundantcode.com’s Coding sample                                      Enter a Number: 12                                            12 * 1 = 12                                              12…

C Program to Find the Largest Number from the 3 Input Numbers

Problem Write a program in C language that accepts 3 numbers as inputs and finds the largest among them and displays it on the screen. How find the largest number among the three input numbers in C language ? Output Abundantcode.com Coding samples                                   Enter number1 : 87                                                   Enter number2 : 54                                         Enter number3 : 23                                           87 is the largest number.

C Program to check if a number is Palindrome or not

Problem Write a program in C to check whether a given number is a palindrome or not. How to find if the number is a palindrome or not in C ? A palindrome is a number where the reverse of a number is equal to the original number. Here’s a program in C demonstrating how to do it. Output Abundantcode.com coding sample Enter a number:…

C Program to find the size of primitive datatypes

Problem Write a program in C to find and display the size of the primitive datatypes likes int , float , double and char using the sizeof function. How to find the size of primitive datatypes in C? Output Size of int: 4 bytes                            Size of float: 4 bytes                              Size of double: 8 bytes                              Size of char: 1 byte

C Program to find the Sum of natural numbers

Problem Write a program in C to find the sum of natural numbers using recursive function. How to find the sum of natural numbers using recursion in C ? Output Abundantcode.com Coding samples Enter the limit : 5 Result = 15

C Program to calculate the sum of Natural Numbers

Problem Write a program in C to take the input (n) from the user and calculate the sum of all the natural numbers from 1 to n. How to calculate the sum of natural numbers in C language ? Output Abundantcode.com coding sample                                                Enter a positive number : 4                                                 Result = 10

C Program to add two integers

Problem Write a program in C to add two integers and display the result on the screen. C Program to add two integers Output Enter first number : 1                                                                                                                                                            Enter second number : 2                                                                                                                                                                  1 + 2 = 3

C Program to display half-pyramid using numbers

Problem Write a program in C to print  half-pyramid using numbers as shown.The program should take the number of rows as input. 1 1 2 1 2 3 1 2 3 4 How to create and display half-pyramid pattern in C using numbers? Output Abundantcode.com Coding samples Enter the No. of rows:4 1 1 2 1 2 3 1 2 3 4

C Program to find the ASCII Value of a Character

Problem Write a program in C to find the Ascii value of a character entered by the user and display the result on the screen. How to find the ASCII Value of a Character in C ? When the user enters the character A , the value 65 (Ascii value) should be displayed on the screen. Here’s a C program for it. Output Enter a…

C Program to display Positive factors of a number

Problem Write a program in C to display all the positive factors of a number enter by the user. How to find and display positive factors of a number in C ? Below is a program in C demonstrating how to do it. Output Abundantcode.com coding sample Enter a Number :5 Positive factors of the number 5 are below: 1 5