Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
NWD
#include <iostream> using namespace std; int nwd(int a,int b) { int c; while(b != 0) { c = a % b; a = b; b = c; } return a; } int main() { int x=0; scanf("%d",&x); for (int i=0; i<x; i++) { int a,b; scanf("%d %d", &a, &b); int y=nwd(a,b); scanf("%d %d", &a, &b); int g=nwd(a,b); int f=nwd(y,g); printf("%d\n",f); } }
run
|
edit
|
history
|
help
0
My Type - nicro
sdfsdf
Simple Interest Calculator
so
BintTree vertical sum
Dar
sheetal
semiprog.cpp
Geometric Series
const_cast