Project 1: Basic Telecom Platform operations
#include
int main()
{
int n;
char a,b,c,d,e,f,g,h,i,z;
printf("* WELCOME TO THE LTE PLATFORM SERVICES *\n");
printf("Enter the desired extension to get services from platform\n");
printf("press a for addition\npress b for multiplication\npress c to increament\npress d for modulus\npress e for right shift\npress f for left shift\npress g for power\npress h for AND operation\npress i for OR operation\npress j to count no. of set bits\npress k to show kpi stats\n\npress q to shutdown the operation\n\nwaiting for your input\n");
scanf("%c",&z);
switch(z)
{
case 'a':
{
int x,num1,num2,s,sum=0;
printf("********PERFORMING ADDITION*********\nenter the no. of elements you want to add:");
scanf("%d",&n);
printf("\nplease enter %d numbers one by one:\n",n);
for(x=0;x
scanf("%d",&s);
sum+=s;
}
printf("The sum is:%d",sum);
}
break;
case 'b':
{
int x,n,m,mult=1;
printf("*********PERFORMING MULTIPLICATION*****\nenter the no. of elements you want to multiply:");
scanf("%d",&n);
printf("\nplease enter %d numbers one by one:\n",n);
for(x=0;x
scanf("%d",&m);
mult*=m;
}
printf("The multiplication is:%d",mult);
}
break;
case 'c':
{
int n;
printf("*********PERFORMING INCREAMENT********\nenter the no. to be increamented:");
scanf("%d",&n);
printf("the increamented value will be: %d",++n);
}
break;
case 'q':
{
printf("Shutting Down the Platform");
exit(0);
}
break;
}
return 0;
}