๐ 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ย Aย andย B. Print “Multiples” ifย Aย isย multipleย ofย Bย orย vice versa. Otherwise print “No Multiples”.
๐ Problem Link: Codeforces Problem
๐ก Solution:
#include<stdio.h>
int main()
{
int a, b;
scanf("%d %d", &a, &b);
if (a%b==0 || b%a==0) printf("Multiples");
else printf("No Multiples");
return 0;
}
โ This solution reads four integers from user and calculate using the given equation.
๐ Input:
9 3
๐ Output:
Multiples
๐ Input:
12 5
๐ Output:
No Multiples
๐ Find Similar Problems from Codeforcesโ Click Here
๐ค More Problem Solving โ Click Here
๐ Learn C Programming โ Click Here