Computer Science, asked by cxtieee, 7 months ago

Write a program that, reading two natural numbers, nonzero a and b displays the last digit of the product of those
two numbers. Example: For a = 7, b = 8, 6 is displayed.​

Answers

Answered by shubhambhosale123
1

Answer:

C language code

#include<stdio.h>

int main()

{

   int a,b;

   printf("a = ");

   scanf("%d",&a);

   printf("b = ");

   scanf("%d",&b);

   if( a > 0 && b > 0 )

    {

          c = a * b;

    }

   rem = c % 10;

   printf("%d",rem);

   return 0;

}

Similar questions