8.
Write a program to print all the tables between 2 and 20 upto 10.
9.
Write a program that will find pythagorean triplets between 1 to 100.
(Pythagorean triplets are such that the square of one number is equal to the
sum of the squares of the other two numbers).
Example: 3,4,5
52 = 32 + 42
25 = 9 + 16 = 25
10. Determine the roots of the quadratic equation
ax2 + bx + C = 0
2 - 4 ac
2a
using the formula x = -by
11. Write a program to find out the sum of the series
1 + x + x2 + x2 ....... xn
Answers
Answered by
0
Answer:
PUT HEADER FILES BY YOUR SELF!
ques 8
int main()
{
for( int i=2; i<=2;i++)
{
for( int j=1;j<=10; j++)
{
printf("%d X %d = %d", i,j,i*j);
}
}
return 0;
}
QUES 9:-
int main()
{
int a=0,b=0,c=0;
for(int i=0;i<=98;i++)
{
a=i;
b=i+1;
c =i+2;
if(a*a == b*b + c*c)
{
printf("%d %d %d",a,b,c);
break;
}
else if(b*b== a*a + c*c)
{
printf("%d %d %d",a,b,c);
break;
}
else if(c*c == a*a+ b*b)
{
printf("%d %d %d",a,b,c);
break;
}
}
return 0;
}
QUES 10:-
CANT UNDERSTAND THE QUES
QUES11:-
CANT UNDERSTAND THE QUES
Similar questions