Saturday, May 29, 2021

How to write a program using case sensitive variables with a new equation of adding three variables then divided by two?

What do you understand by the case sensitive variable with a new equation of program, the equation is D= (a+b+c)/2 for calculating input of variable in dynamic program?

Introduction of the program adding three variable is divided by two

The program calculates the equation by giving some variable value. The value of the variable will apply when the output screen will come after compiling the program. The equation of the program is adding three variables divided by two. The program type is a dynamic for applying the value of a variable during output.

What do you understand by the case sensitive variable with a new equation of program, the equation is D= (a+b+c)/2 for calculating input of variable in dynamic program?

The output of the program is the same as the previous post for example...

If you are giving the value of "a" variable is 2 and values of "b" and "c" are 3 and 5 respectively then the sum of these 10 is divided by 2 two according to the equation then the output is 5. 

Remember in this program the data type is "int" integer has been used. The program doesn't give the output in decimal numbers.

Note :- the equation uses only the parenthesis type of bracket.

What are the components of the program of adding three variable is divided by two?

The program included integer data type that stores value type in digits or a number for every variable. In this program body there are three printf statements added for taking an input of every variable in a program where the input statement scanf is used to take input value of variables. The last printf statement is used to print the value of result which is calculated by the equation of as mentioned in the program after output and input statements above the get character statement in the program. In the program the case sensitive variable is used after declaring the data type, the case sensitive variable is “D” as mentioned above.  

Sunday, May 23, 2021

Write a program of dynamic value of a global variable using an equation for adding two variables?

How to write a program of dynamic value of a global variable using an equation for adding two variables?

How to use the dynamic value of a global variable?

What is the global variable in the program?

Global variable 

The global variable is a type of variable that is declared over the body of the program and declared after the data type. The global variable takes the value for input in all over the program.

How to use the dynamic value of a global variable?

Why is the variable value dynamic in global variables?

The dynamic value continuously changes when you compile or run the program again and again. It cannot take the previous value of the variable you decided or entered first. The value you are using at a time is temporary value during output screen of the program such as “a=34” and “b=45” are the value using at a time and calculated by the according to the equation which is given in the program or you had declared in the program is printed in the “c=79” variable.

How to write a program of dynamic value of a global variable using an equation for adding two variables?, How to use the dynamic value of a global variable?, What is the global variable in the program?

Image reference of the program of dynamic value of variable using an equation for adding two variables are shown above

In the program you see the two header files “<stdio.h>” and “<conio.h>” can be used for standard input/output and console input/output respectively. In the comment section in the image are mentioned above.

Then after declaring the header files there is void main () used for bulk value return from the variable.

In the next line you can see the curly braces which are also “braces” in the program. Here you can see there is an open curly brace for opening the main body of the program.

In the next line you can see that clrscr() was used in the program to clear the screen of output of the program. It clears the previous output result from the screen when you again run the program.

Then declare the data type integer with variable a, b, c. Then store the values in “a” and “b” and declare the equation to calculate the variable values. In the next line print the value in “c” from the sum of the value of two variables “a” and “b” and get the character to the output screen using “getch()”.

How to write a program of dynamic value of a global variable using an equation for adding two variables?, How to use the dynamic value of a global variable?

Output image reference of the program of dynamic variable values using equation of adding two variables

Here is the output image of the program. You can see the statements which you have declared in the program and enter their values of “a” and “b” and output has come from calculation by the equation printed in the “c” variable in the program.

Wednesday, May 19, 2021

Write a program adding three variables which is in the form of constant if their value with their algorithm of a program

How to write a program adding three variables which is in the form of constant if their value?

In the program you have to need component of the program such as header files, for returning bulk value function, data type, constant form of variable, function for equation, output statement and some small parts are semi colon, inverted commas, curly braces etc.

Components of a program for adding three variables of value

In this program you want to need to declare the variable such as “a”, “b”, “c”, and “d” with their values according to your choices after declares the data type. Make an equation for three variable values according to equation. In the equation the adding operator uses in this equation for adding sum of three variable.

This program is aim to practice the program and confirm you to verify that you can get sum of two or more than two variables in the constant program.

Write a program adding three variables which is in the form of constant if their value with their algorithm of a program

Image reference of the adding of three variable values in constant program

So here is the image of the program and their output declared below the program. In this image in the program included two header file, return bulk value function, curly braces, data type, constant value of variable as declared, equation for adding three values of variable, one output statement to print the value in a particular variable which the value zero [d=0] then get character function and then stop or close curly braces.

Saturday, May 15, 2021

Let us discuss about the constant value in using float data type in programing C language.

How to write a program using float data type with constant value of variable in programing C language?

What is Float data type in programing language?

Float data type

The float is a short form of a floating point value in programing language.

The value of float is a decimal term in the digits of mathematics such as decimal number is a “4.4”. Similarly the float is a data type in the programing language which holds the decimal value in a digit or number form.

The float value number has take up to maximum 6 digits after decimal number. For example 5.000000 is a six digit after decimal number.

So you can use the float data type in the programing “C” language to perform the function of adding, subtracting, multiplying and divide also. All are in the function you have to use float data type of variable if you want to perform these functions with the decimal number.

Let us take an example of constant value of variable program with float data type in programing “C” language

Let us discuss about the constant value in using float data type in programing C language.

Here is the image above to perform the constant value of variable of a float data type with the value of 2.6 and 3.6 are the decimal numbers. In the program the value of variable “a” is 2.6 and “b” is a 3.6 in the constant form declared above the main body of the line below the “void main ()” which is for a bulk value.

In the whole program the variable “c” is a zero value which is not a null value of a “c” variable this means the variable have space to stores the result of adding two variable of “a” and “b” before variable “c”. You can also understand the “printf” statement is uses to print the value of adding function that is why it is called “printf” {print function} in the program language in C or C++.