Let us discuss about a simple constant program in “C” language

How to write the program in “C” language for adding two variables in the constant form?

What do you mean by a constant program in language?

Constant program

  • The constant program is about value of the variable which is declared in the program.
  • When you declare the data type then we declare the variable after declaring the data type.
  • So there is the main reason to check the program is in constant category.

 

Let us discuss about a simple constant program in “C” language

This constant program is compiled by any c/c++ compiler software.

Algorithm of constant program adding two variables in “C” language

  • Start program with including preprocessor directive “#include”.
  • Apply the header file of standard input and output “<stdio.h>”.
  • Also apply the console input and output header file “<conio.h>”.
  • Place the void main for bulk value “void main()”.
  • Place the “and” sign in the program “{“ for main body of program.
  • Declare the data type after the data types declare the variable and their values in the same line.
  • Declare equation of the sum of two variables “c=a+b;”.
  • Place the output statement in the next line “printf(“statement”);”.
  • Then place the get character function in the next line “getch();”.
  • Then close or stop the program with “}”.

Comments

  1. Good post of program it is simple and easy to understand

    ReplyDelete

Post a Comment

Popular posts from this blog

The basic model of computation and process of computing the problem in the basic of model of computation

Write a program to find the value of fahrenheit from degree celsius in programming C languages? Introduction to the program of finding value fahrenheit from degree celsius using dynamic variable values topics covered following below What is the interface of a program of finding the value of fahrenheit from degree celsius in C language? Which data type can you use in the program of finding values of fahrenheit from degree celsius? What output statement has been used in the program of finding values of fahrenheit from degree celsius? What input statement has been used in the program of finding values of fahrenheit from degree celsius? How does the program work for finding values of fahrenheit from degree celsius? How do you understand the equation has been used in the program of finding values of fahrenheit from degree celsius? How do you understand the output of the program of finding the values of fahrenheit from degree celsius?

What do you understand by the program structure in "C" Programming language?

Write a program using the equation z is equal to x is divided by y with dynamic variable value in C language

What do you understand by the Operators in "C" programing language?

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 variable in the "C" programing language?

State the Differences between the Testing of a program and Debugging of a program in programing language?

what do you understand by the algorithm?