Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- //permutation using loop
- {
- int a,b,c;
- for (a=1;a<=3;a++){
- for(b=1;b<=3;b++){
- for(c=1;c<=3 ;c++){
- if(b!=a && b!=c && c!=a){
- printf("%d,%d,%d\n",a,b,c);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement