Wednesday, March 25, 2020

switch sample program


#include <stdio.h>

int main()
{
   int a,b,c,d,m,n,o;
   printf("if your are press one it is use to add\n");
   printf("if you are press two for subration\n");
   scanf("%d",&a);
   switch(a)
   {
       case 1:
   
       printf("Enter any two umber:");
       scanf("%d%d",&b,&c);
       d=b+c;
       printf("%d",d);
       break;
     
       case 2:
   
       printf("Enter any two number: ");
       scanf("%d%d",&m,&n);
       printf("%d",o);
       o=m-n;
       break;
   }
   return 0;
}

No comments:

Post a Comment

cisco Cybersecurity Essentials Quiz 8 answer in bold

Question  1 Correct Mark 2.00 out of 2.00 Flag question Question text A company has had several incidents involving users downloading unauth...