Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Divisibility :- #simple-math #ad-hoc-1 #basics
//gcc 5.4.0 #include <stdio.h> int main(void) { int t,n,x,y,i,j; scanf("%d",&t); for(i=1;i<=t;i++) { scanf("%d %d %d",&n,&x,&y); for(j=1;j<n;j++) { if(j%x==0 && j%y!=0) printf("%d ",j); } printf("\n"); } return 0; }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
mohan
Exploiting uninitialized variable
sorted array
Lab 7 v1.0
3,6,8
Lior Yehieli Lesson
B_141125_Repetidos
WHY_?
selection sort
sqrt function
Please log in to post a comment.