3 Nines in an Emergency Call
#include<stdio.h> #include<conio.h> void main() { int a[3][3],b[3][3],c[3][3],r,c; for(r=0;r<=3;r++) { for(c=0;c<3;c++) { printf("\n enter the value="); scanf("%d%d",&a[r][c],&b[r][c]); } } printf("\n first matrix=\n"); for(r=0;r<=3;r++) { for(c=0;c<3;c++) { printf("%d\t",a[r][c]); } printf("\n"); } printf("\n scond matrix=\n"); for(r=0;r<=3;r++) { for(c=0;c<3;c++) {printf("%d\t",b[r][c]); } printf("\n"); } printf("\n sum of given matrix=\n"); for(r=0;r<=3;r++) { for(c=0;c<3;c++) { c[r][c]=a[r][c]+b[r][c]; printf("%d\t",c[r][c]); } printf("\n"); } getch(); }
Combinations of r from n without replacement is c(n,r) = n!/(n-r)!r! c(n,r) = 23!/20!3! c(n,r) = 1771.
what is the full meaning of N.N.P.C.?
if (a > b && a > c) printf("%d\n", a); else if (b > c) printf("%d\n", b); else printf("%d\n", c);
3 Day Weekend - 2003 Boone N-C- was released on: USA: 27 April 2004
bool isDivisibleBy3and7 (int N) return ((N % 3)==0 && (N % 7) == 0);
You can use if-else statements to check for equality.Eg:char a, b, c;scanf("%c%c%c", &a, &b, &c);if( a==b && b==c)printf("They are equal\n");elseprintf("They are not equal\n");
To solve for the sum of the first n number of cubes, use (1+2+3+4+5...+n)2. So for n=100, (1+2+3+4+5...+100)2 = c (cubes) (101 * 50)2 = c 50502 = c c = 25502500
c + n
A hexagon has 9 diagonals. Each vertex of a n-sided polygon can be connected to n - 3 others with diagonals. Thus n(n - 3) possible diagonals. However, when Vertex A is connected to vertex C, vertex C is also connected to vertex A, thus each diagonal is counted twice. Thus: number_of_diagonals = n(n - 3)/2 = 6(6-3)/2 = 6x3/2 = 9
To find the number of combinations of 3 out of 18, you can use the combination formula: ( C(n, r) = \frac{n!}{r!(n-r)!} ). Here, ( n = 18 ) and ( r = 3 ). Plugging in the values, we get ( C(18, 3) = \frac{18!}{3!(18-3)!} = \frac{18 \times 17 \times 16}{3 \times 2 \times 1} = 816 ). Therefore, there are 816 combinations of 3 out of 18.
// HI THIS IS MAYANK PATEL /*C Program to find Maximum of 3 nos. using Nested if*/ #include<stdio.h> #include<conio.h> void main() { int a,b,c; // clrscr(); printf("Enter three number\n\n"); scanf("d%d",&a,&b,&c); if(a>b) { if(a>c) { printf("\n a is maximum"); } else { printf("\n c is maximum"); } } else { if(b>c) { printf("\n b is maximum"); } else { printf("\n c is maximum"); } } getch(); }