This program first takes length of parallel sides and height as input form user using scanf function and stores it in three floating point variables. Then it calculates the area of trapezium using the formula given above. Then, it prints the area of trapezoid on screen using printf function.
This program first takes length of base and height form user using scanf () function and stores it in three floating point variables. Then it calculates the area of Parallelogram using the formula Area of parallelogram = base X height. Then, it prints the area of parallelogram on screen using printf () function.
This Program stores an integer into the variable with int datatype. After it is used for the loop it checks all divisors between 2 and the number itself. Then, Compare it is divisible or not by any number rather than 1 and itself. At last If the user input 1 then it shows the 1 is a prime number. Next, If the user inter 23 then it displays 23 is a prime number and Display to enter another number.
A Decimal Number is constructed with any digit from 0 to 9. For instance, 24 is a Decimal Number constructed from the digits 2 and 4. A Binary Number is constructed with digits 0 and 1. For instance, 11000 is a Binary Number constructed from the digits 1 and 0 which is the value of a Decimal Number 24. This Program will convert any Decimal number entered by the user to its equivalent Binary Number.
This program reversed the entered string that means opposite of the previous string sequence.
Are you want a demonstration of The C Program that reverses an Integer number? This Program reversing the sequence of digits in an Integer. After the successful compilation of the program, a message is displayed on the screen as Please! Enter a string that you want to reverse: Suppose, User, entered 11001 then again a message is displayed as The Equivalent Reversed Number is 10011. The internal execution of the program depends upon the previous demonstration of Reverse an Integer number.
This Program reversed any number such as Integer, float, or decimal in their equivalent. After the successful compilation of the program, a message is displayed on the screen as Please! Enter a string that you want to reverse: Suppose, User, entered 11001 then again a message is displayed as The Equivalent Reversed Number is 10011. Read more...
This Program stores two integers into the int datatype by using to variables. After that store the sum of these two variables into another variable and display it on the screen.After the successful compilation of the program, Program sums up the two entered numbers at once.
This Program runs a loop from 2 to 100 and checks for each current number within range that it is prime or not. After the successful execution of the program it displays the list of all prime numbers from 2 to 100. As we know that 1 is not a prime number so we don't need to check it.
This Program stores two integers one by one into the int datatype. After the successful swapping of numbers it will exchange the value of them at once.
This Program stores two integers one by one into the int datatype. After the successful swapping of numbers it will exchange the value of them at once or you can say that it assign a's value to b and b's value to a.
This Program stores two integers one by one into the int datatype. After that find the Greatest common factor of these two numbers as shown as output.
The factorial of a positive number n is calculated by: The factorial of n (n!) = 1 * 2 * 3 * 4....n In this program we will find the factorial of a number where the number should be entered by the user. Factorial is sequence of a number whose multiply all previous number.
This Program accepts year from users and check whether the given year is leap year or not using ladder if else.
This Program insert 50 at 4th index to the given array.
Never Miss an Articles from us.
Contribute the Community.