1#include <stdio.h>
2void main ()
3{
4 int a[10];
5 int i,j;
6
7 for (i=0;i<10;i++)
8 {
9 printf("Enter %d number: ",i+1);
10 scanf("%d",&a[i]);
11 }
12
13 int count=0;
14
15 for (i = 0; i < 10; ++i)
16 {
17 for(j=i+1;j<10;j++)
18 {
19 if (a[i] + a[j] == 10)
20 count++;
21 }
22 }
23
24 printf("The number of pairs that have sum of 10 is %d",count);
25}