BCA

C LAB :PART A

PROGRAM 1 PROGRAM 2 PROGRAM 3 PROGRAM 4 PROGRAM 5 PROGRAM 6 PROGRAM 7 PROGRAM 8 PROGRAM 9 PROGRAM 10

C LAB : PART B

PROGRAM 1 PROGRAM 2 PROGRAM 3 PROGRAM 4 PROGRAM 5 PROGRAM 6 PROGRAM 7 PROGRAM 8 PROGRAM 9 PROGRAM 10

2. Write a C Program to read three numbers and find the biggest of three

     
 /*Write a C Program to read three numbers and find the biggest of three*/



#include < stdio.h >
#include< conio.h>
 

void main()

{

    int num1, num2, num3;

 

    printf("Enter the values of num1, num2 and num3\n");

    scanf("%d %d %d", &num1, &num2, &num3);

    printf("num1 = %d\tnum2 = %d\tnum3 = %d\n", num1, num2, num3);

    if (num1 > num2)

    {

        if (num1 > num3)

        {

            printf("%d is the greatest among three \n",num1);

        }

        else

        {

            printf("%d is the greatest among three \n",num3);

        }

    }

    else if (num2 > num3)

        printf(" %dis the greatest among three \n",num2);

    else

        printf("%d is the greatest among three \n",num3);
        
        getch();

}