fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int b[]={5,6,4,3,6};
  7. int n=sizeof(b)/sizeof(b[0]);
  8. int k=7;
  9. int count=0;
  10. for(int i=0;i<n;i++){
  11. for(int j=i+1;j<n;j++){
  12. if(b[i]+b[j]==k){
  13. cout<<count;
  14.  
  15. }
  16. }
  17. }
  18.  
  19. return 0;
  20. }
Success #stdin #stdout 0s 5296KB
stdin
Standard input is empty
stdout
Standard output is empty