Write a simple program algorithms flow charts to find out how many of the numbers from 1 to 10 is greater than 4?

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

#include<stdio.h>

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