## C Program to find the first digit of a number

### Description

```Sample Input:
734
Sample Output:
First digit is 7```

### Solution

```#include<stdio.h>
int main()
{
int n,num;
scanf("%d",&num);
n=num;
while(num>=10)
{
num/=10;
}
printf("%d is the first digit in %d",num,n);
return 0;
}
```

### Explanation

`refer video tutorial`

#### Author - Ramesh P Natarajan

Learner, Professor, Technology Trainer, Software Developer and Content Marketer, very much passionate in the field of Software Application Development, Machine Learning and Search Engine Optimization.

### Interesting Pattern Programs: for more Patterns

```Input:
5
Output:
*
**
***
****
*****
****
***
**
*Solution```
```Input:
5
Output:
*
***
*****
*******
*********
*******
*****
***
*Solution```
```Input:
5
Output:
*        *
**      **
***    ***
****  ****
**********Solution```
```Input:
5
Output:
*       *
**     **
***   ***
**** ****
*********Solution```
```Input:
5
Output:
*       *
**     **
***   ***
**** ****
*********
**** ****
***   ***
**     **
*       *Solution```
```Input:
5
Output:
*********
*******
*****
***
*
***
*****
*******
*********Solution```