answersLogoWhite

0

What else can I help you with?

Continue Learning about Engineering

K j equals j but how is that?

K j equals j when K is 1 or j is 0.


What is C program pattern 12321 121 1?

/*determine the pattern 1234321*/ #include<stdio.h> #include<conio.h> main() { int i, j; for (i=1; i<=7; i++) { if (i<5) { j=i; printf("\n %d", j); } else { j=8-i; printf("\n %d", j); } } getch() }


Program to sort numbers in c plus plus?

/* Bubble sort: code snippet only nos to be sorted are in the array named 'n' of size 'N' for(int i=0;i<N-1;i++) for(int j=i+1;j<N-1-i;j++) if(n[j]>n[j+1]) swap(n[j],n[j+1]); */ /* insertion sort int v,j; for(int i=1;i<N;i++) { v=n[j]; for(int j=i-1;j>0&&n[j]>v;j--) n[j+1]=n[j]; n[j+1]=v; } */


C program - to perform matrix addition?

M #include<stdio.h> #include<conio.h> int main() { int a[3][3], b[3][3], sum[3][3], i,j; clrscr(); printf("Enter the first matrix"); for(i=0;i<3;i++) for(j=0;j<3;j++) scanf("%d", &a[i][j]); printf("Enter the second matrix"); for(i=0;i<3;i++) for(j=0;j<3;j++) scanf("%d", &b[i][j]); printf("\nThe first matrix is \n"); for(i=0;i<3;i++) { printf("\n"); for(j=0;j<3;j++) printf("%d\t", a[i][j]); } printf("\nEnter the second matrix"); for(i=0;i<3;i++) { printf("\n"); for(j=0;j<3;j++) printf("%d\t", b[i][j]); } for(i=0;i<3;i++) for(j=0;j<3;j++) sum[i][j]=a[i][j]+ b[i][j]; printf("\n The addition of two matrix is \n"); for(i=0;i<3;i++) { printf("\n"); for(j=0;j<3;j++) printf("%d\t", sum[i][j]); } getch(); return 0; }


How to write java program for FLAMES game?

for (int i = 0;i < nme.length() ;i++ ) { n[i] = nme.charAt(i); } for (int j=0;j < lnme.length() ;j++ ) { l[j] = lnme.charAt(j); } for (int i = 0;i < nme.length() ;i++ ) { for (int j=0;j < lnme.length() ;j++ ){ if(n[i] == l[j]){ n[i] = ' '; l[j]=' '; } } } int C = 0; for (int i = 0;i < nme.length() ;i++ ) { if(n[i] != ' ' ){ C ++; } } for (int j=0;j < lnme.length() ;j++ ) { if(l[j] != ' ' ){ C ++; } } refer this site for full coding: http://shamjeet.blogspot.in/p/java-se.html#c