answersLogoWhite

0


Best Answer

#include<stdio.h>

#include<conio.h>

void main()

{

int n;

clrscr();

printf("\n enter the number:");

scanf("%d",&n);

if(n%2==0)

printf("\n the number is even");

getch();

}

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a algorithm to print even number in C programming language?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is pseudocode in c language how is it different from algorithm?

They are not similar. However one is used to write the other so the question is do you write 1) pseudo code with algorithm 2) an algorithm with pseudo code 3) with a pencil


How to write algorithm in c program?

Algorithms are created using pseudocode, which is a combination of natural language (such as English) and commonly understood programming concepts. Pseudocode is a machine-independent language, but it is far too abstract for a machine to understand. It is intended for humans only. As programmers, our job is to translate these algorithms into a form the machine can process in order to produce the required machine-dependent code. For this we use programming languages, such as C, C++ and Java. The more abstract the programming language, the easier it is to convert an algorithm into working code. Of all the high-level programming languages, C has the least amount of abstraction, however we can make use of third party libraries to increase the amount of abstraction, or we can use the language itself to create our own abstractions.


Where do you run an algorithm?

By preparing test cases we can test an algorithm. The algorithm is tested with each test case.


Is an algorithm close to a programming language?

Fairly close. A programming language is a means of communicating with the machine, instructing it to perform a specific sequence of statements. Depending on the language, those statements may be low-level (like assembly) or high-level (like Java). The level determines the amount of abstraction between the language and the machine. Higher-level languages are easier to program than low-level languages, but low-level languages are generally more efficient. An algorithm is a procedure or formula for solving a problem; a finite series of computation steps to produce a result. A programming language is not an algorithm. It simply provides the means of translating an algorithm into machine-dependant instructions. Algorithms are typically written using pseudo-code, a non-existent, generalised programming language that can be easily translated into a more specific programming language. Many programming languages incorporate algorithms as part of the language. For instance, the C++ standard template library provides many algorithms in the form of function templates that can accommodate a wide variety of sequence containers (class templates), such as arrays, lists, sets and maps, or any user-defined container that follows the standard. For example, the std::sort algorithm is a function template that can be used to sort a sequence container, regardless of it type and regardless of the type of data it contains. Although these algorithms are generic in nature, they are highly optimised such that they do not sacrifice performance for generality. You don't have to use them -- you can easily write your own algorithms to perform the same tasks -- but it makes no sense to re-invent wheels unnecessarily, especially for an "everyday" algorithm like sorting or accumulation. Programs are themselves an algorithm, albeit a highly-complex one composed of many individual algorithms. Thus we can think of a programming language as being the means of implementing simple algorithms in order to solve complex problems.


Why c language cannot be developed in any other programming language?

Your question makes no sense. If you wanted to ask if it is possible to write a C-compiler in another programming language, the answer would be yes.

Related questions

How do you write algorith of C programs?

There is no specific Hard and Fast rule for writing algorithm. The normal method is the following: 1. get a problem 2. find or invent an algorithm to solve it 3. implement the algorithm in a programming language (C, for example)


What is pseudocode in c language how is it different from algorithm?

They are not similar. However one is used to write the other so the question is do you write 1) pseudo code with algorithm 2) an algorithm with pseudo code 3) with a pencil


How to write algorithm in c program?

Algorithms are created using pseudocode, which is a combination of natural language (such as English) and commonly understood programming concepts. Pseudocode is a machine-independent language, but it is far too abstract for a machine to understand. It is intended for humans only. As programmers, our job is to translate these algorithms into a form the machine can process in order to produce the required machine-dependent code. For this we use programming languages, such as C, C++ and Java. The more abstract the programming language, the easier it is to convert an algorithm into working code. Of all the high-level programming languages, C has the least amount of abstraction, however we can make use of third party libraries to increase the amount of abstraction, or we can use the language itself to create our own abstractions.


How do you write an Algorithm for a C plus plus Program?

You don't write an algorithm for a C++ program, unless you are documenting the C++ program after-the-fact. The normal procedure is to write the algorithm first, in a language independent fashion, and then translate that stated algorithm into C++ code, or into whatever language you wish.


First step you should take when creating a program?

The first step you should take when creating a program is to write an algorithm for it. An algorithm is a programming tool that offers a step by step solution to a programming problem.


Write an algorithm to check whether a number is a prime number or not?

You can write out this algorithm. This will then be programmed into the device to make determining prime numbers easier.


Where do you run an algorithm?

By preparing test cases we can test an algorithm. The algorithm is tested with each test case.


What is algorithm write properties of algorithm?

An ALGORITHM is a sequence of steps that depicts the program logic independent of the language in which it is to be implemented. An algorithm should be designed with space and time complexities in mind.


How programming language is useful in system programming?

Without programming languages you couldn't write (system) programs.


What is algorithams?

Algarithm: Algorithm is process to solve the problem in a step by step order Algorithm is used to write the program in a computer language. thrinath.sachin@gmail.com


What you 'll do using programming language?

Write computer-programs, I suppose.


Write an algorithm?

Algorithms are simply a set of steps to take in order to reach an answer. It is often linked with computer programming and can be written in plain english.