Find the largest of any three numbers in C

Introduction

The following below describes how to write a program and draw a flow chart to find the largest of any three numbers.

Flow Chart:-

Find the largest of any three numbers in C

Flow chart to find the largest of any three numbers in C

Program:-

 #include <stdio.h>  
 #include <string.h>  
 void main(){  
      int x,y,z  
      chrscr();  
      printf("Enter any three numbers:");  
      scanf("%d%d%d",&x,&y,&z);  
      if(x>y){  
           if(x>z)  
                printf("%d is greatest",x)  
                else  
                     printf("%d is greatest",z)  
      }  
      else if(y>z)  
           printf("%d is greatest",y)  
      else  
           printf("%d is greatest",z)  
      getch();  
 }  

Summary

Thanks

Kailash Chandra Behera

I am an IT professional with over 13 years of experience in the full software development life cycle for Windows, services, and web-based applications using Microsoft .NET technologies.

Previous Post Next Post

نموذج الاتصال