How can you make a program of printing all possible combinations of any three digits?

1 answer

Answer

1214570

2026-07-25 22:15

+ Follow

#include<iOStream.h> void main() { int num[3],i,j,k; cout<<"enter any three numbers"; for(i=0;i<3;i++) cin>>num[i]; for(i=0;i<3;i++) for(j=0;j<3;j++) for(k=0;k<3;k++) if(i!=j && j!=k && i!=k) cout<<num[i]<<num[j]<<num[k]<<endl; }

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.