C examples for Operator:Arithmetic Operator

Click the following links for the tutorial for Operator and Arithmetic Operator.

- Basic Arithmetic Operations and Basic Arithmetic Operators
- Let C compiler to figure out the operator priority
- Arithmetic Operators in C
- Arithmetic In C
- Operator Precedence for Common Arithmetic Operators
- Demonstrates math operators, and the different types of division
- Calculates the average of four grades and also does some other basic math.
- Asks the user for a number of tires and price per tire, then calculates a total price, adding sales tax.
- Asks the user for their birth year and calculates how old they will be in the current year.
- Increases a counter from 1 to 5, printing updates and then counts it back down to 1. Uses while loops and increment and decrement operators
- Increases a counter from 1 to 5, printing updates and then counts it back down to 1. Uses the increment and decrement operators
- Asks for a number from 1 to 100 and tells then whether or not their choice is equally divisible by 2 through 9
- Multiply two numbers and display the result for as long as the user wants. Answering 'N' will break the loop
- Illustrating the Modulus Operator
- Illustrate the use of various arithmetic operators
- Calculate the average of a set of grades and count the number of failing grades.
- Arithmetic Operators
- Use the modulus operator to convert a large number of seconds into hours, minutes, and seconds.
- Finds how many years it takes for the value of compounded interest to exceed the value of simple interest.
- Finds percentage of days below freezing from user input
- Calculates electric bill, rate are based on usage
- Read a positive integer and then displays all the prime numbers smaller than or equal to that number.
- Write a program that reads the hours worked in a week and then prints the gross pay, the taxes, and the net pay.
- Write a program that asks for your first name, your last name, and then prints the names in the format last, first.
- Read a volume in cups and that displays the equivalent volumes in pints, ounces, tablespoons, and teaspoons.
- Read your height in inches and then displays your height in centimeters.
- Read an amount of water in quarts, and displays the number of water molecules in that amount.
- Read your age in years and then displays the equivalent number of seconds.
- Read a height in centimeters and displays the height in centimeters and in feet and inches.
- Read the number of days and then converts that value to weeks and days.
- Converts time in minutes to time in hours and minutes.
- Read the number of miles traveled and the number of gallons of gasoline consumed and then calculate and display the miles-per-gallon value
- Sets a type double variable to 1.0/3.0 and a type float variable to 1.0/3.0, display result three times
- Read the download speed in megabits per second (Mbs) and the size of a file in megabytes (MB), calculate the download time for the file.
- Convert Fahrenheit temperature to Celsius equivalent and the Kelvin equivalent
- Evaluates running totals of these two series up to some limit of number of terms.
- Calculate the value of their difference divided by their product.
- Calculate how many years it takes for empty an account that earns 8% a year and withdraws $100,000
- Tax calculation based on United States Federal Tax Schedule
- Read the hours worked in a week and then prints the gross pay, the taxes, and the net pay.
- Read two numbers and raise the first one to the power of second one
- Create function called min(x,y) that returns the smaller of two double values.
- Do addition, subtraction, multiplication, or division based on menu selection
- Calculate harmonic mean of two numbers which is taking the inverses of the two numbers, averaging them, and taking the inverse of the result.
- Presents a menu of pay rates from which to choose.