Search This Blog

Sunday, 17 May 2020

programming C(high number)

  Write a program to input two numbers and display the highest number (if content)


 #include <stdio.h>
    #include <stdlib.h>

    int main()
    {

      int no1,no2,max;
      printf("enter two numbers \n");
      scanf("%d %d",&no1,&no2);
      max=no1;
      if(no2>max)
      max=no2;

      printf("the highest is %d\n",max);

     }

     

No comments:

Post a Comment

please wait...