Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- void ss()
- {
- printf("\t\t\t\tSelection Screen\n\n");
- printf("1 - Polynomial Evaluation\n");
- printf("2 - Statistical Algorithm\n");
- printf("3 - Matrix Operations\n");
- printf("4 - Exit\n\n");
- }
- void polynomialEval()
- {
- int poly[10],n=0,i=0;
- printf("\nhow many input:");
- scanf("%d",&n);
- if(n>10)
- printf("Error: Only maximum of 10 inputs");
- else if(n<0)
- printf("Error: value must be greater than zero");
- else{
- for(i=0; i<n;i++)
- {
- printf("\nEnter poly[%d]=",i);
- scanf("%d",&poly[i]);
- }
- }
- for(i=0;i<n;i++)
- {
- printf("%dx^%d",poly[i],i);
- if(i<n-1)
- printf("+");
- }
- printf("\n\n\n");
- }
- void statisticalAlgo()
- {
- int num=0;
- printf("1-mean\n");
- printf("2-standard deviation\n");
- printf("3-summation\n");
- printf("Choose a number: ");
- scanf("%d",&num);
- if(num==1)
- {
- }
- else if(num==2)
- {
- }
- else
- }
- int main(){
- int num=0;
- do{
- ss();
- scanf("%d",&num);
- switch(num)
- {
- case 1: system("cls");
- polynomialEval();
- break;
- case 2: system("cls");
- printf("\n\ncase 2\n\n");
- break;
- case 3: system("cls");
- printf("\n\ncase 3\n\n");
- break;
- case 4: printf("Bye. Thank you");
- exit(0);
- break;
- }
- }while(num!=4);
- system ("PAUSE");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement