determanint calculator entery
This commit is contained in:
parent
a8553f977a
commit
b1346999f3
1 changed files with 21 additions and 6 deletions
27
main.c
27
main.c
|
@ -12,7 +12,8 @@ int main()
|
||||||
printf("\n\n 1. Hypotenuse calculator");
|
printf("\n\n 1. Hypotenuse calculator");
|
||||||
printf("\n 2. Quadratic formula calculator");
|
printf("\n 2. Quadratic formula calculator");
|
||||||
printf("\n 3. Area of a circle");
|
printf("\n 3. Area of a circle");
|
||||||
printf("\n 4. Matrix");
|
printf("\n 4. Build a matrix");
|
||||||
|
printf("\n 5. Matrix determinant");
|
||||||
printf("\n\n Enter your choice here:_____");
|
printf("\n\n Enter your choice here:_____");
|
||||||
printf("\033[D");
|
printf("\033[D");
|
||||||
printf("\033[D");
|
printf("\033[D");
|
||||||
|
@ -46,7 +47,7 @@ int main()
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
system("clear");
|
system("clear");
|
||||||
printf("\n ~~ Quadratic formula calculator ~~\n\n");
|
printf("\n ~~ Quadratic formula ~~\n\n");
|
||||||
|
|
||||||
printf("Please enter the value for \"a\":\n");
|
printf("Please enter the value for \"a\":\n");
|
||||||
double numA;
|
double numA;
|
||||||
|
@ -66,7 +67,7 @@ int main()
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
system("clear");
|
system("clear");
|
||||||
printf("\n ~~ Area of a circle calculator ~~\n\n");
|
printf("\n ~~ Area of a circle ~~\n\n");
|
||||||
printf(" o o\n o o\n o o\n o o\n o o\n o o\n");
|
printf(" o o\n o o\n o o\n o o\n o o\n o o\n");
|
||||||
printf("\n enter a radius:\n");
|
printf("\n enter a radius:\n");
|
||||||
|
|
||||||
|
@ -78,17 +79,31 @@ int main()
|
||||||
case 4:
|
case 4:
|
||||||
|
|
||||||
system("clear");
|
system("clear");
|
||||||
printf("\n ~~ matrix *beta* ~~\n\n");
|
printf("\n ~~ Build a matrix ~~\n\n");
|
||||||
int numRows;
|
int numRows;
|
||||||
int numColumns;
|
int numColumns;
|
||||||
printf("\nPlease enter the number of rows:");
|
printf("\nPlease enter the number of rows: ");
|
||||||
scanf("%d", &numRows);
|
scanf("%d", &numRows);
|
||||||
printf("\nPlease enter the number of columns:");
|
printf("\nPlease enter the number of columns: ");
|
||||||
scanf("%d", &numColumns);
|
scanf("%d", &numColumns);
|
||||||
buildMatrix(numRows, numColumns);
|
buildMatrix(numRows, numColumns);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
// case 5:
|
||||||
|
|
||||||
|
// system("clear");
|
||||||
|
// printf("\n ~~ Matrix determinant ~~\n\n");
|
||||||
|
// int numRows;
|
||||||
|
// int numColumns;
|
||||||
|
// printf("\nPlease enter the number of rows:");
|
||||||
|
// scanf("%d", &numRows);
|
||||||
|
// printf("\nPlease enter the number of columns:");
|
||||||
|
// scanf("%d", &numColumns);
|
||||||
|
// buildMatrix(numRows, numColumns);
|
||||||
|
|
||||||
|
// break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
printf("\n Incorrect input, try again.\n");
|
printf("\n Incorrect input, try again.\n");
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue