Answers for "c Pythagorean triples"

0

c Pythagorean triples

{3,4,5}
Posted by: Guest on October-15-2021
0

c Pythagorean triples

#include <stdio.h>
#include <stdlib.h>

int main() {
	int a, b, c;

	printf("TERNE PITAGORICHE!\n\nPrimo numero: ");
	scanf("%d", &a);
	
	printf("Secondo numero: ");
	scanf("%d", &b);
	
	printf("Terzo numero: ");
	scanf("%d", &c);
	
	if((a * a + b * b) == (c * c))
	{
		printf("E' una terna pitagorica!\n\n\n");
	}
	else
	{
		printf("Non e' una terna pitagorica!\n\n\n");
	}
	
	system("pause");
}
Posted by: Guest on February-11-2021

Python Answers by Framework

Browse Popular Code Answers by Language