Posts

Showing posts with the label C-Programming

Quadratic Formula in C language

Image
Remember the famous quadratic formula? Let's learn today, how we can implement it in c language. First, we'll take variables a, b and c for the quadratic formula values. Pos and Neg variable for negative and postive value of quadratic formula. Then, we'll take the values of a,b, and c as input from the user. After that, we'll calculate '4' into 'a' into 'c' i.e (4 * a * c) and save the answer in d variable and apply the condition value of d is greater than 0 than continue, else show complex roots. In if condition we'll apply the formula to calculate the value of quadratic value. and save the answer in their respective variable.  After that, we'll print the answers. Related: Marksheet in C. How to Return Multiple Values from a function . Calculator in C Using If-Else .

Clear Screen in C

Image
Learn how you can clear screen in command prompt or cmd in C language. Clearing screen is important for big projects, let's seen how you can do this in your c program too. First, we'll add a new library file, which will help us to clear the screen without calling this library, clearing screen task can't be done. Then, we'll write a code which will clear the screen in cmd. How to Clear Screen in C You Might Like: Marksheet in C . Convert Miles into Meters in C.

How to Create Marksheet in C

Image
Here's an example, how you can create a mark sheet in C language. First, we'll take the marks of five subjects from the user to generate the mark sheet. These marks will be stored in a variable of the float data type. After that, we'll apply the formula to calculate the percentage and design a template for mark sheet. Marksheet in C Related: C Program for fibonacci serires. Calculator in C using functions (subroutines).

C Program to Convert Miles into Meter

Image
Here's the complete c program to convert miles into meters. First, we're taking two variables named mile and meter in float data types. Then, we'll get the value from the user in miles. After getting the value we'll apply the formula to convert miles into meters. How to Convert Miles into Meter in C? Related: Convert Fahrenheit into Celsius  in C. C Program to check number is Positive or Negative. Calculator in C .

Calculate Reduced Mass in C language

Image
First, we'll take input the values of masses of the first & second body, and then store them in the variables m1 and m2 respectively. Then, we'll apply a condition, since mass can't be negative or less than zero. After that, we'll apply the formula to calculate reduced mass. Calculate Reduced Mass in C language  Related: Second Equation of Motion in C . C Program to check the number is positive negative or zero. How to Get Multiple Value from a Function in C . Calculator in C . 

Second equation of motion in C language

Image
Before going into this, we'll use a library of math.h, for mathematic operations. First, we'll take input the values of initial velocity, time and acceleration, and then store the inputs in the variables. Then, we will apply a condition, because time can't be negative. After that, we'll apply the formula to calculate distance. Second equation of motion in the C language  Related : C Program to check even or odd . How to Calculate K.E in C . C Program to Calculate Acceleration .

How to Calculate Kinetic Energy in C

Image
How this Program Work? Before starting we will be using a library of math.h, for mathematic operations. First, we'll take input the values of mass and velocity and store the input in the variables. Then, we will apply a condition, because mass can't be negative. After that, we'll apply the formula to calculate kinetic energy. Calculate Kinetic Energy in C Related: C Program to Calcualte Acceleration Calculate Speed in C C Program to Calculate Final Velocti y