Skip to main content

Posts

Showing posts from July, 2018
Write a program in C to print the larger of three numbers  with  t he  help of   algorithm and flowchart. Algorithm: Step 1: Start Step 2: Read n1, n2, n3 Step 3: If n1>n2 and n1>n3 then                 Display “n1 is greater than n2 and n3”                 Else                 Goto step 4. Step 4: If n2>n1 and n2>n3 then                 Display “n2 is greater than n1 and n3”                 Else                 Goto step 5. Step 5: If n3>n1 and n3>n2 then                 Display “n3 is greater than n1 and n2”                 Else                 Display “both or all the no’s are equal” Step 6: Stop Flowchart  : Program:   #include <stdio.h> #include<conio.h> int main() {      int n1, n2, n3;      printf("\n Please Enter three different numbers\n");      scanf("%d %d %d", &n1, &n2, &n3);      if (n1 > n2 && n1 > n3)     {