answersLogoWhite

0

/* c program for how many of the numbers from 1 to 10 is greater than 4? */

#include

void main()

{

int i ,j=0; /* j is used for counting the nos greater than 4 from 1 to 10*/

for(i=1;i<=10;i++)

if(i>4)

j++;

printf("\n The numbers greater than 4 , from 1 to 10 is %d",j);

}

Algorithm

step 1:start

step 2 :initialize j=0

step 3 :Initialize i=1,check whether i < 10 ,if true increment i else go to step 6

step 4: check whether i >4 If true go to step5 ,else go to step 3

step 5 :Increment j and then go to step 3

step 6:print the value of j

step 7 :Stop

User Avatar

Wiki User

15y ago

What else can I help you with?

Continue Learning about Engineering

What is flowchart of stack using array in c prog?

Two little problems: 1. stack doesn't have a flow-chart 2. there are no flow-charts in a C program


What types of charts can you create from data in a spreadsheet?

Spreadsheet packages may chart one set of data in the form of a pie chart, or two or more sets of data in bar charts (with vertical bars, horizontal bars, or stacked bars), line charts, area charts, or mixed charts, which combine bars and lines


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.


What is the algorithm n flowchart for calculating factorial of number using recursion?

A flowchart for factorial of number can be made using different software's. Microsoft Word is the most popular software for beginners to make simple flowcharts.In order to draw the flowchart write the number at the top of the paper and then draw two lines under it going slightly to the sides. Decide what two numbers can be multiplied to equal that number. Keep going until you can no longer get to smaller numbers.


How to calculate steel bar charts?

l multiply 2.66 multiply (D)squre

Related Questions

What is the name of the program that sets information into charts where numbers and words can be visualized and usd?

a do do do a da da da


What express numbers visually?

charts


What do stem and leaf charts show?

Numbers


Algorithms are presented visually by using flow charts?

Yes. At least, that is one way of presenting an algorithm. Other ways include a verbal description, and pseudocode.


What has the author Thomas J Schriber written?

Thomas J. Schriber has written: 'Fundamentals of flowcharting' -- subject(s): Electronic digital computers, Flow charts, Programming, Algorithms 'An introduction to simulation using GPSS/H' -- subject(s): Digital computer simulation, GPSS (Computer program language)


What is Microsoft office 2007?

It is a spreadsheet program. This can also be used for editing charts.


What computer program do you use to create a spreadsheet and create charts?

Microsoft excel


Who is numbers 1 in the charts?

rihanna-only girl


What are the different ways of representing algorithms?

You can represent an algorithm by three different ways: 1. Pseudo Code 2. Structured flow charts 3. Actual code


What program on open office 2 lets you create graphs charts and diagrams?

Impress


Where can one go to find information on different types of charts an graphs?

A place where one could find information on different types of charts and graphs would be an office program such as Microsoft Power Point. This program explains the design and usage for many charts and graphs in simple language accompanied by a useful help menu.


What software program is used to generate charts and graphs from numeric tables?

Microsoft office excel

Trending Questions
What is direct indexing in milling? Why is it important to evaluate possible solutions during the engineering design process? What is ampere rating of a fuse used to protect a 5.5 mm squared conductor? What is a machine that is made of two simple machines? How do you turn the heat off? Why is it important for us to remove the metal jewelry matches ring before working on electric circuit? If you are measuring the voltage of a three phase power system you take only two phase in account then why there is a need for third phase? How does ANV electric company phase controller type APR-3 works? How do you pass enum object as argument to function in c? Are fixed end beams an indeterminate structure? Who built the Itsukushima Torii gate? Where do you put a pump in an old large cement mermaid statue fountain? How does Prim's algorithm differ from Kruskal's and Dijkstra's algorithms? What will happen to frequency of current when voltage is changed using a step up or step down transformer? Have a step up tranformer. 110 volts to 220 volts. Power 550VA. Can I connect the secondary to 220 volts and get 110 volts form the Primary and use this 110 volts to run an equipment that draws 2 amps? How do I know if my waterproofing contractor does good work? Assembly language program in 8086 to check wether given string is palindrome or not? Difference between static and dynamic characteristics of transducers? WHY CAN’T WE THROW THE ELECTRONIC DEVICES IN REGULAR DUSTBINS? How much water does a steam engine use?