17) Write a C program to enter any number and find its first and last digit using for loop
Answers
Answered by
1
Answer:
C Program to find first and last digit of a given number using loop:
#include <stdio.h>
int main()
{
int n, sum=0, firstDigit, lastDigit;
printf("Enter number = ");
scanf("%d", &n);
// Find last digit of a number.
lastDigit = n % 10;
Similar questions