using C programming You are given an array of integers \"array[]\" and an input
ID: 3794895 • Letter: U
Question
using C programming
Explanation / Answer
#include <stdio.h>
int main(void) {
// your code goes here
int a[10],i,j,x;
for(i = 0; i < 10; i++)
{
scanf("%d",&a[i]);
}
scanf("%d",&x);
for(i = 0; i < 10; i++)
{
for(j = i+1; j < 10; j++)
{
if ((x*x) == (a[i]*a[i] + a[j]*a[j]))
{
printf("%d %d ", i,j);
}
}
}
return 0;
}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.