# C Programming Code Examples

## C > Mathematics Code Examples

### Read a Coordinate Point in a XY Coordinate System and Determine its Quadrant

```
```

```
```

Define and use Global variables in C code - C program code example to Define and use Global variables. Declare a global variable. Function prototypes. Hiding the global count. Function t1 using global variable. Function...

Display the contents of structure elements - C Program code to use structure within union & display the contents of structure elements. Problem statement: Create one structure and declare it inside union. Then accept values for

Check Vowel or Consonant use switch case - English Alphabets a, e, i, o, u both lowercase & uppercase are known as vowels. Alphabets other than Vowels are known as Consonants. Input an alphabet from user. Store it in some

For Statement is Typically used to Count a - The "First section" specifies the starting point for the count. The "Second section" sets the counting limit. The "Last section" determines the "counting frequency". The formula of the

C Programs Calculates the Simple Interest - Program calculates the simple interest given the principal amount, rate of interest & time. The Formula to calculate the Simple interest is: simple_interest = (p * t * r) / 100 where p...

Calculator Program by use C++ Functions - A simple C++ Calculator which have different functions for different operations. menu base selection screen using switch statement. Ever operation should have its own function. Code

C++ Basic Operation Addition Subtraction - "Addition(+)" of 2 vectors. "Subtraction(-)" of 2 vectors. "Multiplication" of vector with the scalar. "Cross" product of 2 vectors. Scalar(or dot) product of 2 vectors. Negative of vectors