From a33c1f98ed0e0b5aa3d176707e786d338406eded Mon Sep 17 00:00:00 2001 From: Saksham Garg Date: Mon, 28 Jun 2021 12:21:31 +0530 Subject: [PATCH] Create program.cpp --- program.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 program.cpp diff --git a/program.cpp b/program.cpp new file mode 100644 index 0000000..f3ab576 --- /dev/null +++ b/program.cpp @@ -0,0 +1,30 @@ +#include +using namespace std; +int getPairsCount(int arr[], int n, int num) +{ + int count = 0; + for (int i = 0; i < n; i++) + for (int j = i + 1; j < n; j++) + if ((arr[i] + arr[j]) % num == 0) + count++; + return count; +} +int main() { + int T; + cin>>T; + while(T>0){ + int size; + cin>>size; + int arr[size]; + for(int i=0; i>arr[i]; + } + int num = 4; + cout<