Solution:
.......................................................................................................................................................
#include <stdio.h>
void cal()
{
int num1=0, num2=0,op=0;
while(1)
{
printf("Enter number1 and number2\n");
scanf("%d %d",&num1, &num2); // take number from user
printf("1.Addition\n2.Subtraction\n3.Multiplication\n4.Division\n");
scanf("%d",&op); // ask for option
switch(op)
{
case 1:
printf("%d+%d = %d\n",num1, num2,num1+num2); //print addition
break;
case 2:
printf("%d-%d = %d\n",num1, num2,num1-num2); // print sub
break;
case 3:
printf("%d*%d = %d\n",num1, num2,num1*num2); // print mult
break;
case 4:
printf("%d/%d = %lf\n",num1, num2,(double)num1/(double)num2); // print div
break;
}
}
}
int main()
{
cal();
}

#include <stdio.h>
void sorter(void)
{
int array[10]; // take 10 number sequence
int i,j,temp;
printf("Enter the sequence: ");
for(i=0; i<10; i++)
{
scanf("%d",&array[i]); // take data from user
}
for(i=0; i<10; i++)
{
for(j=0; j<10; j++)
{
if(array[i] > array[j]) // swap if required
{
temp = array[i]; // swapping logic
array[i] = array[j];
array[j] = temp;
}
}
}
for(i=0; i<10; i++) // print sequence
{
printf("%d ",array[i]);
}
}
int main()
{
sorter();
}

Project: Building the software with specific functions, namely, Calculator, and Sorter Subtask 1:...
Using C++, build a sorter that can rank a sequence of numbers in a descending order. It should be able to process at least 2 types of data, for example the integer sequence and the double sequence.
PLease IN C not in C++ or JAVA, Lab3. Write a computer program in C which will simulate a calculator. Your calculator needs to support the five basic operations (addition, subtraction, multiplication, division and modulus) plus primality testing (natural number is prime if it has no non-trivial divisors). : Rewrite your lab 3 calculator program using functions. Each mathematical operation in the menu should be represented by a separate function. In addition to all operations your calculator had to support...
Write a C++ Program that simulates a basic calculator using functions which performs the operations of Addition, Subtraction, multiplication, and Division. ( make sure you cover the case to avoid division by a zero) Display a menu for list of operations that can be calculated and get the input from user about his choice of calculation. Based on user choice of operation, take the input of number/numbers from user. Assume all input values are of type double. Calculations must be...
Write a C++ Program that simulates a basic calculator using functions which performs the operations of Addition, Subtraction, multiplication, and Division. ( make sure you cover the case to avoid division by a zero) Display a menu for the list of operations that can be calculated and get the input from the user about his choice of calculation. Based on user choice of operation, take the input of number/numbers from user. Assume all input values are of type double. Calculations...
Convert the following C fragment to equivalent MIPS assembly language Write mini calculator that take two integer numbers as input and ask the user if he need to compute addition, subtraction, remainder, division, or multiplication then print the result. Hint: you can give each operation a special number. For example, the addition (1), subtraction (2), …. And so on. The output must be something like: Enter the first integer number: 5 Enter the second integer number: 3 Which operation? 1...
Write a Python Program that displays repeatedly a menu as shown in the sample run below. The user will enter 1, 2, 3, 4 or 5 for choosing addition, substation, multiplication, division or exit respectively. Then the user will be asked to enter the two numbers and the result for the operation selected will be displayed. After an operation is finished and output is displayed the menu is redisplayed, you may choose another operation or enter 5 to exit the...
Write a java calculator program that perform the following operations: 1. function to Addition of two numbers 2. function to Subtraction of two numbers 3. function to Multiplication of two numbers 4. function to Division of two numbers 5. function to Modulus (a % b) 6. function to Power (a b ) 7. function to Square root of () 8. function to Factorial of a number (n!) 9. function to Log(n) 10. function to Sin(x) 11. function to Absolute value...
A Simple Calculator Summary: Write a console program (character based) to do simple calculations (addition, subtraction, multiplication and division) of two numbers, using your understanding of Java. Description: You need to write a program that will display a menu when it is run. The menu gives five choices of operation: addition, subtraction, multiplication, division, and a last choice to exit the program. It then prompts the user to make a choice of the calculation they want to do. Once the...
Big Number Arithmetic C Program The goal is to perform several multiplication functions/algorithims using unlimited length digits (BigInts) and compare their execution times. The program requires a header file which includes all functions needed by the .c file. Required functions: ClassicalMult (bigInt A, bigInt B, int base) - this function multiplies two big integers using the classical multiplication algorithim. KaratsubaMult (bigInt A, bigInt B, int base) - this function multiplies two big integers using the Karatsuba multiplication algorithim. ToomMult (bigInt...
Please use 2 new classes! Overview Develop an interactive multi-purpose calculator to input, calculate, and display results for operations on a variety of mathematical types. The different types include a basic Floating-point type, a Vector type, and a Fraction type. Write a system that allows a user to perform basic operations on each of these types by entering the type of calculator, operation, and left and right operands. The system will perform the selected operation, print the results, and continue...