Computer Science, asked by parekhkhushi33, 21 days ago

17) Write a C program to enter any number and find its first and last digit using for loop​

Answers

Answered by khushirathi123
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