Computer Science, asked by mahimamonga, 11 months ago

Write a program to input and print the largest digits

Answers

Answered by girisht232
0

Answer:

Program to convert Number in Characters

  1. #include<stdio.h>
  2. #include<stdlib.h>
  3. int main(){
  4. long int n,sum=0,r;
  5. system("cls");
  6. printf("enter the number=");
  7. scanf("%ld",&n);
  8. while(n>0)
Answered by ParthPawar7
1

Answer:

Hi friend, this is what I found on Google.

Explanation:

#include <stdio.h>

  int main() {

        int num, large = 0, rem = 0;

        /* get the input from the user */

        printf("Enter your input value:");

        scanf("%d", &num);

        /* finding the largest digit of the given input */

        while (num > 0) {

                rem = num % 10;

                if (rem > large) {

                        large = rem;

                }

                num = num / 10;

        }

        /* print the largest digit of the number */

        printf("Largest digit of the number is %d\n", large);

        return 0;

  }

Mark me as the brainliest !!!☺️☺️

Similar questions