- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 20
- Posts with Upvotes
- 19
- Upvoting Members
- 2
- Downvotes Received
- 5
- Posts with Downvotes
- 5
- Downvoting Members
- 4
11 Posted Topics
Re: It's quite simple, just get the string(word) into a char array,initialise int array (with all elements=0)to count occurences .Then input the required letter start a loop with i=0 and char of i not equal to /0 then check for the equality of entered letter and char of i if its … | |
Re: I WILL GIVE YOU ACPP CODE FOR THE SAME I DONT KNOW ABOUT JAVA YOU CAN HAVE THE LOGIC #include<iostream.h> #include<stdio.h> #include<conio.h> #include<string.h> void main() { char A[100],B[100]; int n,c,i,r; cout<<"\n Enter the string : "; gets(A); i=0; n=0; while(A[i]!='\0') { i++; n++; } strcpy(B,A); cout<<"\n Enter the rotation factor … | |
Re: TRY THIS CODE THIS WILL HELP YOU TO FIND DETERMINANT COFACTOR ADJOINT AND INVERSE OF A MATRIX #include<iostream.h> #include<conio.h> #include<math.h> #include<iomanip.h> float A[3][3],B[3][3]; int i,j,k,l,m,n,e,f,g,h; float det=0; void main() { clrscr(); cout<<"Enter the 3x3 matrix :\n"; for(i=0;i<3;i++) for(j=0;j<3;j++) cin>>A[i][j]; //TO FIND COFACTOR AND DETERMINANT for(i=0,k=1,m=2,e=-1,g=2;i<3;i++,e++,g--,k-=g,m-=e) { for(j=0,l=1,n=2,f=-1,h=2;j<3;j++,f++,h--,l-=h,n-=f) { B[i][j]=pow(-1,(i+j))*((A[k][l]*A[m][n])-(A[m][l]*A[k][n])); if(i==0) … | |
Re: Is that some range 30-49 , 50-100 ? if so 2nd code is a blunder,first might be better. > How is male and female declared? nothing is clear. | |
Re: HEY BUDDY YOU CAN LOG ONTO [(http://www.pastebin.com) ]and get some code | |
//PROGRAM TO FIND DERIVATIVE(FIRST AND SECOND)OF POLYNOMIAL FUNCTIONS #include<iostream.h> #include<conio.h> void main() { int i,d,coeff[100],degree[100]; clrscr(); cout<<"\nEnter the degree of the polynomial : "; cin>>d; for(i=d;i>=0;i--) { if(i>1) { degree[i]=i; cout<<"\nEnter the coefficient of x^"<<degree[i]<<" (with sign) : "; cin>>coeff[i]; } else if(i==1) { degree[i]=i; cout<<"\nEnter the coefficient of x … | |
Re: //TO FIND INVERSE OF A MATRIX #include<iostream.h> #include<conio.h> #include<math.h> #include<graphics.h> #include<iomanip.h> float A[3][3],B[3][3]; int i,j,k,l,m,n,e,f,g,h; float det=0; void main() { clrscr(); cout<<"Enter the 3x3 matrix :\n";//Enters the matrix for(i=0;i<3;i++) for(j=0;j<3;j++) cin>>A[i][j]; //To find cofactor and determinant for(i=0,k=1,m=2,e=-1,g=2;i<3;i++,e++,g--,k-=g,m-=e) { for(j=0,l=1,n=2,f=-1,h=2;j<3;j++,f++,h--,l-=h,n-=f) { B[i][j]=pow(-1,(i+j))*((A[k][l]*A[m][n])-(A[m][l]*A[k][n])); if(i==0) { det+=A[i][j]*B[i][j]; } } } cout<<"The determinant of … | |
//TO FIND INVERSE OF A MATRIX #include<iostream.h> #include<conio.h> #include<math.h> #include<graphics.h> #include<iomanip.h> float A[3][3],B[3][3]; int i,j,k,l,m,n,e,f,g,h; float det=0; void main() { clrscr(); cout<<"Enter the 3x3 matrix :\n";//Enters the matrix for(i=0;i<3;i++) for(j=0;j<3;j++) cin>>A[i][j]; //To find cofactor and determinant for(i=0,k=1,m=2,e=-1,g=2;i<3;i++,e++,g--,k-=g,m-=e) { for(j=0,l=1,n=2,f=-1,h=2;j<3;j++,f++,h--,l-=h,n-=f) { B[i][j]=pow(-1,(i+j))*((A[k][l]*A[m][n])-(A[m][l]*A[k][n])); if(i==0) { det+=A[i][j]*B[i][j]; } } } cout<<"The determinant of … | |
Re: is it necessary that you use recursion ? i have another code for the same try it #include<iostream.h> #include<conio.h> void main() { int A[100],B[100]; int n,c,i,r; cout<<"\n Enter the size : "; cin>>n; cout<<"\n Enter the array : "; i=0; while(i<n) { cin>>A[i]; i++; } for(i=0;i<n;i++) B[i]=A[i]; cout<<"\n Enter the … | |
#include<dos.h> #include<iostream.h> #include<stdlib.h> #include<conio.h> #include<stdio.h> #include<string.h> #include<graphics.h> int y; int i; struct element{ char name[20]; int at_no; double at_wt,at_r,en,ion,density,mp,bp; char ato_wt[20],ato_r[20],eno[20]; char iono[20],densityo[20],mpo[20],bpo[20]; char crs[20]; char sym[4]; char earr[100]; }E[118]; void numberfind(int); void numrfind(int,int); void massfind(double); void namfind(char*); void namlfind(char); void massrfind(double,double); void ionifind(double); void ionirfind(double,double); void enegfind(double); void enegrfind(double,double); … | |
[Moderator edit: 3500 lines of code removed as it was totally irrelevant to the question and severely affecting load time of the page] |
The End.