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
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
English,
3 months ago
Hindi,
3 months ago
English,
3 months ago
Social Sciences,
7 months ago
English,
7 months ago
Social Sciences,
1 year ago
Social Sciences,
1 year ago