0% found this document useful (0 votes)
6 views

Cs 2 F

Uploaded by

sanjusmsn20001
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Cs 2 F

Uploaded by

sanjusmsn20001
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Interplanar Spacing Par cle in 1-D box Roots of quadratic equation: Subtraction of two matrices:

#include<stdio.h> include<stdio.h>
#include<stdio.h> #include<stdio.h> include<conio.h>
#include<conio.h> #include<conio.h> #include<conio.h> void main()
#include<math.h> #include<math.h> #include<math.h> {
void main() int i,j,k,m,n,p,q;
int main() void main() int a[10][10],b[10][10],diff[10][10];
{ { { printf("\n enter the order of matrix a");
float w1,d,s,pi; float h,m,l,energy; clrscr(); scanf("%d%d",&m,&n);
float e=1.6*pow(10,-19); float a,b,c,disc,r1,r2; printf("\n enter the order of matrix b");
float c[6]={14,20,25,29.5,32.5,36.5}; scanf("%d%d",&p,&q);
int n=1,i; int n=5,i; printf(“\n enter the coefficient of printf("\n enter the elements of matrix a:");
pi=3.142; clrscr(); quadratic equation: \n”); for(i=0;i<m;i++)
w1=1.54*pow(10,-10); h=6.625*pow(10,-34); scanf(“%f%f%f”,&a,&b,&c); {
disc=(b*b-4*a*c); for(j=0;j<n;j++)
for(i=0;i<6;i++) m=9.1*pow(10,-31); scanf("%d",&a[i][j]);
l=10*pow(10,-9); if (disc<0)
{ }
for(i=1; i<=n; i++) printf(“\n roots are imaginary \n”); printf("\n enter the elements of matrix b:");
d=(n*w1)/(2*sin(c[i]*(pi/180))); else for(i=0;i<p;i++)
s=(d*pow(10,10)); { {
{
prin ("interplanar spacing at an angle energy=((pow(i,2)*pow(h,2))/(8*m*pow(l,2)))/ for(j=0;j<q;j++)
r1=(-b+sqrt(disc))/(2*a); scanf("%d",&b[i][j]);
%.1f degree is %.3fE-10 \n",c[i],s); e; r2=(-b-sqrt(disc))/(2*a); }
} prin ("Energy of electron at n=%d is %.3f printf(“\n the roots are: \n); printf("\n the matrix a:\n");
getch(); eV\n",i,energy); printf(“\n r1=%f”,r1); for(i=0;i<m;i++)
} } printf(“\n r2=%f”,r2); {
for(j=0;j<n;j++)
getch(); } printf("%d\t", a[i][j]);
} getch(); printf("\n");
} }
printf("\n the matrix b: \n");
for(i=0;i<p;i++)
{
energy =pow(n*h/l, 2)/(8 *m*e);
printf("Enter the value of length

for(j=0;j<q;j++)
printf("\n Energy of electron at

printf("%d\t",b[i][j]);
for(n = 1; n <= nmax"; n++)

v=(2.183*pow(10,6)0/i;
n="%d is %fev\n", energy);

wavelength at n=%d is
h=6.625*pow(10,-34);
printf("\n");

m=9.1*pow(10,-31);
h=6.625* pow(10, -34);

%.3fE-10 m\n”,i,s);
float h, m, l, e, energy;

#include<conio.h>
m=9.1*pow(10, -31);

w1=(h/m)*(1.0/v);
of the box in nmin");

#include<math.h>

printf("diff of two matrices:\n");


#include<stdio.h>
e=1.6* pow (10-19);

printf(“de Broglie
for(i=1;i<=n;i++)
#include <conio.h>

1=1+pow (10, -9)",

float w1,m,v,s,h;
#include <math.h>
#include <stdio.h>

for(i=0;i<m;i++)
int n, mmax = 5;

scanf("%f", &l);

}
De broglie:
Energy levels

s=w1*1e10;
for(j=0;j<n;j++)
void main()
void main()

{
int i,n=5;
clrscr();

getch();
diff[i][j]=a[i][j]-b[i][j];
getch();

printf ("%d\t", diff[i][j]);


}
{

printf("\n");
{

}
}
getch();
}
prin ("\n the transpose of matrix
prin ("enter the order of matrix

}
prin ("\n enter the elements of

prin ("Enter a number\n");


prin ("\n the matrix a: \n");
scanf("%d%d",&m,&n);
Transpose of a matrix

prin ("%d \t",a[i][j]);


scanf("%d",&a[i][j]);
int a[10][10],i,j,m,n;

#include<conio.h>
#include<stdio.h>
#include<conio.h>
#include<stdio.h>

scanf("%d",&n);
for(i=0;i<m;i++)

for(i=0;i<m;i++)
for(j=0;j<n;j++)

for(j=0;j<n;j++)
matrix a\n");

while (i<=n)
void main()

fact=fact*i;
prin ("\n");

i=1; fact=1;
void main()

float fact;
Factorial

clrscr();
int i,n;
a:\n");
\n");

i++;
{

}
{

You might also like