Decision Control Statement

In a C program ,a decision causes a one-time jump to a different part of a program , depending on the value of an expression.Decisions in C can be made in several ways.The most important is with the if..else statement,which chooses between two alternatives.This Statement can be used without the else...

Algorithm to check whether the given number is prime or not.

Write an algorithm to check whether the given number is prime or not. 1.Start 2.Read the number num 3.[Initialize]     i=2 , flag=1 4. repeat steps 4 through 6 until i < num or flag=0 5.rem=num mod i 6.if rem=0 then flag=0  else     i=i+1 7.if flag=0 then                  ...