Problem Solving Using C

🔍 Problem Solving from Codeforces using C language

This is a problem-solving post from Codeforces. Below is the problem with a short explanation and its solution.

This example is solved using C language.

🧩 Main Problem: Given two numbers N and M. Print the summation of their last digits.

🔗 Problem Link: Codeforces Problem

💡 Solution:

#include<stdio.h>
int main()
{
    long long int a, b, c, d;
    scanf("%lld %lld", &a, &b);
    c=a%10;
    d=b%10;
    printf("%d", c+d);
    return 0;
}

✅ This solution reads four integers from user and calculate using the given equation.

📝 Input:

13 12

📄 Output:

5

🔗 Find Similar Problems from CodeforcesClick Here

🤔 More Problem SolvingClick Here

📘 Learn C ProgrammingClick Here

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *