SlideShare a Scribd company logo
Shri Rawatpura Sarkar Institute of Technology-II New Raipur (C.G.)
1 DepartmentofMechanicalEngineering–4th
Sem.PreparebyMsSwagitaDwivedi
Experiment No. 1
Aim:-Write a C-Program to calculate the area & Perimeter of the rectangle and the area &
circumference of the circle. The length and breadth of a rectangle and radius of a circle are
input through keyboard.
/* Program for finding area & circumference */
#include<stdio.h>
#include<conio.h>
#define pi 3.14
int main()
{
float r,l,b,area,perimeter,circum,areac;
printf("enter the radius of circletlength breadth of rectanglen");
scanf("%f %f %f",&r,&l,&b);
circum=2*pi*r;
areac=pi*r*r;
area=l*b;
perimeter=2*l+2*b;
printf("Area and circumference of circle is =%ft%fnnn",areac,circum);
printf("Area and Perimeter of rectangle is =%ft%f",area,perimeter);
getch();
}
Shri Rawatpura Sarkar Institute of Technology-II New Raipur (C.G.)
2 DepartmentofMechanicalEngineering–4th
Sem.PreparebyMsSwagitaDwivedi
/* Output */
enter the radius of circle length breadth of rectangle
5
3
4
Area and circumference of circle is =78.500000 31.400000
Area and Perimeter of rectangle is =12.000000 14.000000
Shri Rawatpura Sarkar Institute of Technology-II New Raipur (C.G.)
3 DepartmentofMechanicalEngineering–4th
Sem.PreparebyMsSwagitaDwivedi
Experiment No. 2
Aim:-Write a C-Program to determine whether the character entered through a keyboard is a
capital letter ,a small case letter, a digit or a special symbol.
/* Program to whether the character entered through a keyboard is a capital letter ,a small case
letter, a digit or a special symbol.*/
#include<stdio.h>
#include<conio.h>
int main()
{
char ch;
printf("Enter any charactern");
scanf("%c",&ch);
if(ch>=65 && ch<=91)
printf("Entered character is capital case letter");
else if(ch>=97 && ch<=123)
printf("Entered character is small case letter");
else if(ch>=48 && ch<=57)
printf("Entered character is Digit");
else
printf("Entered character is special symbol");
getch();
}
/* Output */
Enter any character
Shri Rawatpura Sarkar Institute of Technology-II New Raipur (C.G.)
4 DepartmentofMechanicalEngineering–4th
Sem.PreparebyMsSwagitaDwivedi
p
Entered character is small case letter
Experiment No. 3
Aim:-Write a program which has the following options:
a) Factorial of a number
b) Prime or not
c) Odd or Even
/* Menu Driven Program*/
#include<stdio.h>
#include<conio.h>
int main()
{
int ch,fact=1,num,i;
printf("Enter any numbernn");
scanf("%d",&num);
printf("nEnter your chice from 1 to 3nn");
printf("Factorial of a number.............1nn");
printf("Prime or not......................2nn");
printf("Odd or even.......................3nn");
scanf("%d",&ch);
switch(ch)
{
case 1:
for(i=1;i<=num;i++)
fact= fact*i;
printf("factorial of given number is = %d",fact);
break;
case 2:
Shri Rawatpura Sarkar Institute of Technology-II New Raipur (C.G.)
5 DepartmentofMechanicalEngineering–4th
Sem.PreparebyMsSwagitaDwivedi
for(i=2;i<num;i++)
{
if(num%i==0)
{
printf("Entered number is not
primen");
break;
}
}
if(num==i)
printf("number is primen");
break;
case 3:
if(num%2==0)
printf("Enter number is even");
else
printf("Enter number is Odd");
break;
default:
printf("Out of range");
break;
getch();
}
}
/* Output */
Enter any number
5
Shri Rawatpura Sarkar Institute of Technology-II New Raipur (C.G.)
6 DepartmentofMechanicalEngineering–4th
Sem.PreparebyMsSwagitaDwivedi
Enter your chice from 1 to 3
Factorial of a number.............1
Prime or not......................2
Odd or even.......................3
1
factorial of given number is = 120
Enter any number
5
Enter your chice from 1 to 3
Factorial of a number.............1
Prime or not......................2
Odd or even.......................3
2
number is prime
Enter any number
5
Enter your chice from 1 to 3
Factorial of a number.............1
Prime or not......................2
Odd or even.......................3
Shri Rawatpura Sarkar Institute of Technology-II New Raipur (C.G.)
7 DepartmentofMechanicalEngineering–4th
Sem.PreparebyMsSwagitaDwivedi
3
Enter number is Odd
Experiment No. 4
Aim:-Write a C-Program to sort an array using bubble sort technique.
/*Program to sort an array using bubble sort*/
#include<stdio.h>
#include<conio.h>
int main()
{
int i,j,num,a[10],temp;
printf("enter total number to store in arrayn");
scanf("%d",&num);
printf("enter nummbersn");
for(i=0;i<num;i++)
scanf("%d",&a[i]);
for(i=0;i<num;i++)
{
for(j=0;j<num-i;j++)
{
if(a[j]>a[j+1])
{
temp=a[j];
a[j]=a[j+1];
a[j+1]=temp;
}
}
}
printf("stored array using bubble sortn ");
for(i=0;i<num;i++)
printf("%dt",a[i]);
Shri Rawatpura Sarkar Institute of Technology-II New Raipur (C.G.)
8 DepartmentofMechanicalEngineering–4th
Sem.PreparebyMsSwagitaDwivedi
getch();
}
/* Output */
enter total number to store in array
7
enter nummbers
12
15
6
8
3
9
5
stored array using bubble sort
3 5 6 8 9 12 15
Shri Rawatpura Sarkar Institute of Technology-II New Raipur (C.G.)
9 DepartmentofMechanicalEngineering–4th
Sem.PreparebyMsSwagitaDwivedi
Experiment No. 5
Aim:-Write a program to find the roots of an equation using Newton Raphson Method.
/* Program for Newton Raphson Method*/
#include<stdio.h>
#include<conio.h>
#include<math.h>
float f(float x)
{
return x*log10(x) - 1.2;
}
float df (float x)
{
return log10(x) + 0.43429;
}
int main()
{
int itr, maxmitr;
float h, x0, x1, allerr;
printf("nEnter x0, allowed error and maximum iterationsn");
scanf("%f %f %d", &x0, &allerr, &maxmitr);
for (itr=1; itr<=maxmitr; itr++)
{
h=f(x0)/df(x0);
x1=x0-h;
printf(" At Iteration no. %3d, x = %9.6fn", itr, x1);
if (fabs(h) < allerr)
{
Shri Rawatpura Sarkar Institute of Technology-II New Raipur (C.G.)
10 DepartmentofMechanicalEngineering–4th
Sem.PreparebyMsSwagitaDwivedi
printf("After %3d iterations, root = %8.6fn", itr, x1);
return 0;
}
x0=x1;
}
printf(" The required solution does not converge or iterations are
insufficientn");
getch();
}
/* Output */
Enter x0, allowed error and maximum iterations
2
4
4
At Iteration no. 1, x = 2.813170
After 1 iterations, root = 2.813170
Shri Rawatpura Sarkar Institute of Technology-II New Raipur (C.G.)
11 DepartmentofMechanicalEngineering–4th
Sem.PreparebyMsSwagitaDwivedi
Experiment No. 6
Aim:-Write a program to find the solution of differential equation by Runge Kutta Equation.
#include<stdio.h>
#include<conio.h>
#include<math.h>
float f(float x,float y);
int main()
{
float x0,y0,m1,m2,m3,m4,m,y,x,h,xn;
printf("Enter x0,y0,xn,h:");
scanf("%f %f %f %f",&x0,&y0,&xn,&h);
x=x0;
y=y0;
printf("nnXttYn");
while(x<xn)
{
m1=f(x0,y0);
m2=f((x0+h/2.0),(y0+m1*h/2.0));
m3=f((x0+h/2.0),(y0+m2*h/2.0));
m4=f((x0+h),(y0+m3*h));
m=((m1+2*m2+2*m3+m4)/6);
y=y+m*h;
x=x+h;
printf("%ft%fn",x,y);
}
Shri Rawatpura Sarkar Institute of Technology-II New Raipur (C.G.)
12 DepartmentofMechanicalEngineering–4th
Sem.PreparebyMsSwagitaDwivedi
}
float f(float x,float y)
{
float m;
m=(x-y)/(x+y);
return m;
getch();
}
/* Output */
Enter x0,y0,xn,h:3
4
5
6
X Y
9.000000 4.909602
Shri Rawatpura Sarkar Institute of Technology-II New Raipur (C.G.)
13 DepartmentofMechanicalEngineering–4th
Sem.PreparebyMsSwagitaDwivedi
Experiment No. 7
Aim:-Write a program to practice one of the numerical Integration Method.
/* SIMPSON'S 1/3 RULE Integration method*/
#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
float x[10],y[10],sum=0,h,temp;
int i,n,j,k=0;
float fact(int);
clrscr();
printf("nhow many record you will be enter: ");
scanf("%d",&n);
for(i=0; i<n; i++)
{
printf("nnenter the value of x%d: ",i);
scanf("%f",&x[i]);
printf("nnenter the value of f(x%d): ",i);
scanf("%f",&y[i]);
}
h=x[1]-x[0];
n=n-1;
sum = sum + y[0];
for(i=1;i<n;i++)
Shri Rawatpura Sarkar Institute of Technology-II New Raipur (C.G.)
14 DepartmentofMechanicalEngineering–4th
Sem.PreparebyMsSwagitaDwivedi
{
if(k==0)
{
sum = sum + 4 * y[i];
k=1;
}
else
{
sum = sum + 2 * y[i];
k=0;
}
}
sum = sum + y[i];
sum = sum * (h/3);
printf("nn I = %f ",sum);
getch();
}
/* Output */
how many record you will be enter: 5
enter the value of x0: 0
enter the value of f(x0): 1
enter the value of x1: 0.25
enter the value of f(x1): 0.8
Shri Rawatpura Sarkar Institute of Technology-II New Raipur (C.G.)
15 DepartmentofMechanicalEngineering–4th
Sem.PreparebyMsSwagitaDwivedi
enter the value of x2: 0.5
enter the value of f(x2): 0.6667
enter the value of x3: 0.75
enter the value of f(x3): 0.5714
enter the value of x4: 1
enter the value of f(x4): 0.5
I = 0.693250
Shri Rawatpura Sarkar Institute of Technology-II New Raipur (C.G.)
16 DepartmentofMechanicalEngineering–4th
Sem.PreparebyMsSwagitaDwivedi

More Related Content

What's hot

C Programming
C ProgrammingC Programming
C Programming
Sumant Diwakar
 
VTU Data Structures Lab Manual
VTU Data Structures Lab ManualVTU Data Structures Lab Manual
VTU Data Structures Lab Manual
Nithin Kumar,VVCE, Mysuru
 
Lab. Programs in C
Lab. Programs in CLab. Programs in C
Lab. Programs in C
Saket Pathak
 
Practical write a c program to reverse a given number
Practical write a c program to reverse a given numberPractical write a c program to reverse a given number
Practical write a c program to reverse a given number
Mainak Sasmal
 
Lab manual data structure (cs305 rgpv) (usefulsearch.org) (useful search)
Lab manual data structure (cs305 rgpv) (usefulsearch.org)  (useful search)Lab manual data structure (cs305 rgpv) (usefulsearch.org)  (useful search)
Lab manual data structure (cs305 rgpv) (usefulsearch.org) (useful search)
Make Mannan
 
C programs
C programsC programs
C programsMinu S
 
C programming Lab 2
C programming Lab 2C programming Lab 2
C programming Lab 2
Zaibi Gondal
 
88 c-programs
88 c-programs88 c-programs
88 c-programs
Leandro Schenone
 
The solution manual of c by robin
The solution manual of c by robinThe solution manual of c by robin
The solution manual of c by robin
Abdullah Al Naser
 
Srinivas Reddy Amedapu C and Data Structures JNTUH Hyderabad
Srinivas Reddy Amedapu C and Data Structures JNTUH HyderabadSrinivas Reddy Amedapu C and Data Structures JNTUH Hyderabad
Srinivas Reddy Amedapu C and Data Structures JNTUH Hyderabad
Srinivas Reddy Amedapu
 
Cs291 assignment solution
Cs291 assignment solutionCs291 assignment solution
Cs291 assignment solution
Kuntal Bhowmick
 
Printing different pyramid patterns of numbers,alphabets and stars using C.
Printing different pyramid patterns of numbers,alphabets and stars using C.Printing different pyramid patterns of numbers,alphabets and stars using C.
Printing different pyramid patterns of numbers,alphabets and stars using C.
Hazrat Bilal
 
Practical write a c program to reverse a given number
Practical write a c program to reverse a given numberPractical write a c program to reverse a given number
Practical write a c program to reverse a given number
Mainak Sasmal
 
All important c programby makhan kumbhkar
All important c programby makhan kumbhkarAll important c programby makhan kumbhkar
All important c programby makhan kumbhkar
sandeep kumbhkar
 
Core programming in c
Core programming in cCore programming in c
Core programming in c
Rahul Pandit
 

What's hot (19)

C program
C programC program
C program
 
C Programming
C ProgrammingC Programming
C Programming
 
VTU Data Structures Lab Manual
VTU Data Structures Lab ManualVTU Data Structures Lab Manual
VTU Data Structures Lab Manual
 
C lab-programs
C lab-programsC lab-programs
C lab-programs
 
Lab. Programs in C
Lab. Programs in CLab. Programs in C
Lab. Programs in C
 
Practical write a c program to reverse a given number
Practical write a c program to reverse a given numberPractical write a c program to reverse a given number
Practical write a c program to reverse a given number
 
Lab manual data structure (cs305 rgpv) (usefulsearch.org) (useful search)
Lab manual data structure (cs305 rgpv) (usefulsearch.org)  (useful search)Lab manual data structure (cs305 rgpv) (usefulsearch.org)  (useful search)
Lab manual data structure (cs305 rgpv) (usefulsearch.org) (useful search)
 
C and Data Structures
C and Data Structures C and Data Structures
C and Data Structures
 
C lab excellent
C lab excellentC lab excellent
C lab excellent
 
C programs
C programsC programs
C programs
 
C programming Lab 2
C programming Lab 2C programming Lab 2
C programming Lab 2
 
88 c-programs
88 c-programs88 c-programs
88 c-programs
 
The solution manual of c by robin
The solution manual of c by robinThe solution manual of c by robin
The solution manual of c by robin
 
Srinivas Reddy Amedapu C and Data Structures JNTUH Hyderabad
Srinivas Reddy Amedapu C and Data Structures JNTUH HyderabadSrinivas Reddy Amedapu C and Data Structures JNTUH Hyderabad
Srinivas Reddy Amedapu C and Data Structures JNTUH Hyderabad
 
Cs291 assignment solution
Cs291 assignment solutionCs291 assignment solution
Cs291 assignment solution
 
Printing different pyramid patterns of numbers,alphabets and stars using C.
Printing different pyramid patterns of numbers,alphabets and stars using C.Printing different pyramid patterns of numbers,alphabets and stars using C.
Printing different pyramid patterns of numbers,alphabets and stars using C.
 
Practical write a c program to reverse a given number
Practical write a c program to reverse a given numberPractical write a c program to reverse a given number
Practical write a c program to reverse a given number
 
All important c programby makhan kumbhkar
All important c programby makhan kumbhkarAll important c programby makhan kumbhkar
All important c programby makhan kumbhkar
 
Core programming in c
Core programming in cCore programming in c
Core programming in c
 

Viewers also liked

Unit Testing on Android - Droidcon Berlin 2015
Unit Testing on Android - Droidcon Berlin 2015Unit Testing on Android - Droidcon Berlin 2015
Unit Testing on Android - Droidcon Berlin 2015
Buşra Deniz, CSM
 
Company Profile - Compressed
Company Profile - CompressedCompany Profile - Compressed
Company Profile - CompressedSolly Moeng - APR
 
Teks ekposisi
Teks ekposisiTeks ekposisi
Teks ekposisi
BERBUDIANTO
 
Cn lab manual
Cn lab manualCn lab manual
Cn lab manual
Vivek Kumar Sinha
 
Lab manual asp.net
Lab manual asp.netLab manual asp.net
Lab manual asp.net
Vivek Kumar Sinha
 
Computer applications in civil engineering lab
Computer applications in civil engineering labComputer applications in civil engineering lab
Computer applications in civil engineering lab
Vivek Kumar Sinha
 
Softwareenggineering lab manual
Softwareenggineering lab manualSoftwareenggineering lab manual
Softwareenggineering lab manual
Vivek Kumar Sinha
 
Computer hardware and simulation lab manual
Computer  hardware and simulation lab manualComputer  hardware and simulation lab manual
Computer hardware and simulation lab manual
Vivek Kumar Sinha
 
Oops lab manual
Oops lab manualOops lab manual
Oops lab manual
Vivek Kumar Sinha
 
Java final lab
Java final labJava final lab
Java final lab
Vivek Kumar Sinha
 
Graphics User Interface Lab Manual
Graphics User Interface Lab ManualGraphics User Interface Lab Manual
Graphics User Interface Lab Manual
Vivek Kumar Sinha
 
Network security Lab manual
Network security Lab manual Network security Lab manual
Network security Lab manual
Vivek Kumar Sinha
 
Eurest Breakfast White Paper
Eurest Breakfast White PaperEurest Breakfast White Paper
Eurest Breakfast White Paper
Gaurang Patel
 
WebRTC on Mobile
WebRTC on MobileWebRTC on Mobile
WebRTC on Mobile
Buşra Deniz, CSM
 
Graphics practical lab manual
Graphics practical lab manualGraphics practical lab manual
Graphics practical lab manual
Vivek Kumar Sinha
 
COMPUTER GRAPHICS LAB MANUAL
COMPUTER GRAPHICS LAB MANUALCOMPUTER GRAPHICS LAB MANUAL
COMPUTER GRAPHICS LAB MANUAL
Vivek Kumar Sinha
 

Viewers also liked (16)

Unit Testing on Android - Droidcon Berlin 2015
Unit Testing on Android - Droidcon Berlin 2015Unit Testing on Android - Droidcon Berlin 2015
Unit Testing on Android - Droidcon Berlin 2015
 
Company Profile - Compressed
Company Profile - CompressedCompany Profile - Compressed
Company Profile - Compressed
 
Teks ekposisi
Teks ekposisiTeks ekposisi
Teks ekposisi
 
Cn lab manual
Cn lab manualCn lab manual
Cn lab manual
 
Lab manual asp.net
Lab manual asp.netLab manual asp.net
Lab manual asp.net
 
Computer applications in civil engineering lab
Computer applications in civil engineering labComputer applications in civil engineering lab
Computer applications in civil engineering lab
 
Softwareenggineering lab manual
Softwareenggineering lab manualSoftwareenggineering lab manual
Softwareenggineering lab manual
 
Computer hardware and simulation lab manual
Computer  hardware and simulation lab manualComputer  hardware and simulation lab manual
Computer hardware and simulation lab manual
 
Oops lab manual
Oops lab manualOops lab manual
Oops lab manual
 
Java final lab
Java final labJava final lab
Java final lab
 
Graphics User Interface Lab Manual
Graphics User Interface Lab ManualGraphics User Interface Lab Manual
Graphics User Interface Lab Manual
 
Network security Lab manual
Network security Lab manual Network security Lab manual
Network security Lab manual
 
Eurest Breakfast White Paper
Eurest Breakfast White PaperEurest Breakfast White Paper
Eurest Breakfast White Paper
 
WebRTC on Mobile
WebRTC on MobileWebRTC on Mobile
WebRTC on Mobile
 
Graphics practical lab manual
Graphics practical lab manualGraphics practical lab manual
Graphics practical lab manual
 
COMPUTER GRAPHICS LAB MANUAL
COMPUTER GRAPHICS LAB MANUALCOMPUTER GRAPHICS LAB MANUAL
COMPUTER GRAPHICS LAB MANUAL
 

Similar to Mech nacp lab

Lab manualsahu[et&amp;t]
Lab manualsahu[et&amp;t]Lab manualsahu[et&amp;t]
Lab manualsahu[et&amp;t]
Vivek Kumar Sinha
 
C and Data Structures Lab Solutions
C and Data Structures Lab SolutionsC and Data Structures Lab Solutions
C and Data Structures Lab Solutions
Srinivas Reddy Amedapu
 
Complete Lab 123456789123456789123456789
Complete Lab 123456789123456789123456789Complete Lab 123456789123456789123456789
Complete Lab 123456789123456789123456789
vickyvikas51556
 
Lab program 1234567891234567891234567891
Lab program 1234567891234567891234567891Lab program 1234567891234567891234567891
Lab program 1234567891234567891234567891
akashpunarvi2005
 
lab.123456789123456789123456789123456789
lab.123456789123456789123456789123456789lab.123456789123456789123456789123456789
lab.123456789123456789123456789123456789
Ghh
 
Srinivas Reddy Amedapu, CPDS, CP Lab, JNTU Hyderabad
Srinivas Reddy Amedapu, CPDS, CP Lab, JNTU HyderabadSrinivas Reddy Amedapu, CPDS, CP Lab, JNTU Hyderabad
Srinivas Reddy Amedapu, CPDS, CP Lab, JNTU Hyderabad
Srinivas Reddy Amedapu
 
Zoro123456789123456789123456789123456789
Zoro123456789123456789123456789123456789Zoro123456789123456789123456789123456789
Zoro123456789123456789123456789123456789
Ghh
 
labb123456789123456789123456789123456789
labb123456789123456789123456789123456789labb123456789123456789123456789123456789
labb123456789123456789123456789123456789
Ghh
 
C and Data structure lab manual ECE (2).pdf
C and Data structure lab manual ECE (2).pdfC and Data structure lab manual ECE (2).pdf
C and Data structure lab manual ECE (2).pdf
janakim15
 
C- Programming Assignment 4 solution
C- Programming Assignment 4 solutionC- Programming Assignment 4 solution
C- Programming Assignment 4 solution
Animesh Chaturvedi
 
DSC program.pdf
DSC program.pdfDSC program.pdf
DSC program.pdf
Prof. Dr. K. Adisesha
 
C programs
C programsC programs
C programs
Vikram Nandini
 
Hargun
HargunHargun
Dam31303 dti2143 lab sheet 7
Dam31303 dti2143 lab sheet 7Dam31303 dti2143 lab sheet 7
Dam31303 dti2143 lab sheet 7alish sha
 
Main ds manual
Main ds manualMain ds manual
Main ds manual
Vivek Kumar Sinha
 
design and analysis of algorithm Lab files
design and analysis of algorithm Lab filesdesign and analysis of algorithm Lab files
design and analysis of algorithm Lab files
Nitesh Dubey
 
sodapdf-converted into ppt presentation(1).pdf
sodapdf-converted into ppt presentation(1).pdfsodapdf-converted into ppt presentation(1).pdf
sodapdf-converted into ppt presentation(1).pdf
MuhammadMaazShaik
 

Similar to Mech nacp lab (20)

Lab manualsahu[et&amp;t]
Lab manualsahu[et&amp;t]Lab manualsahu[et&amp;t]
Lab manualsahu[et&amp;t]
 
C and Data Structures Lab Solutions
C and Data Structures Lab SolutionsC and Data Structures Lab Solutions
C and Data Structures Lab Solutions
 
Complete Lab 123456789123456789123456789
Complete Lab 123456789123456789123456789Complete Lab 123456789123456789123456789
Complete Lab 123456789123456789123456789
 
Lab program 1234567891234567891234567891
Lab program 1234567891234567891234567891Lab program 1234567891234567891234567891
Lab program 1234567891234567891234567891
 
lab.123456789123456789123456789123456789
lab.123456789123456789123456789123456789lab.123456789123456789123456789123456789
lab.123456789123456789123456789123456789
 
week-3x
week-3xweek-3x
week-3x
 
Srinivas Reddy Amedapu, CPDS, CP Lab, JNTU Hyderabad
Srinivas Reddy Amedapu, CPDS, CP Lab, JNTU HyderabadSrinivas Reddy Amedapu, CPDS, CP Lab, JNTU Hyderabad
Srinivas Reddy Amedapu, CPDS, CP Lab, JNTU Hyderabad
 
Zoro123456789123456789123456789123456789
Zoro123456789123456789123456789123456789Zoro123456789123456789123456789123456789
Zoro123456789123456789123456789123456789
 
labb123456789123456789123456789123456789
labb123456789123456789123456789123456789labb123456789123456789123456789123456789
labb123456789123456789123456789123456789
 
C PROGRAMS
C PROGRAMSC PROGRAMS
C PROGRAMS
 
C and Data structure lab manual ECE (2).pdf
C and Data structure lab manual ECE (2).pdfC and Data structure lab manual ECE (2).pdf
C and Data structure lab manual ECE (2).pdf
 
C- Programming Assignment 4 solution
C- Programming Assignment 4 solutionC- Programming Assignment 4 solution
C- Programming Assignment 4 solution
 
Data struture lab
Data struture labData struture lab
Data struture lab
 
DSC program.pdf
DSC program.pdfDSC program.pdf
DSC program.pdf
 
C programs
C programsC programs
C programs
 
Hargun
HargunHargun
Hargun
 
Dam31303 dti2143 lab sheet 7
Dam31303 dti2143 lab sheet 7Dam31303 dti2143 lab sheet 7
Dam31303 dti2143 lab sheet 7
 
Main ds manual
Main ds manualMain ds manual
Main ds manual
 
design and analysis of algorithm Lab files
design and analysis of algorithm Lab filesdesign and analysis of algorithm Lab files
design and analysis of algorithm Lab files
 
sodapdf-converted into ppt presentation(1).pdf
sodapdf-converted into ppt presentation(1).pdfsodapdf-converted into ppt presentation(1).pdf
sodapdf-converted into ppt presentation(1).pdf
 

More from Vivek Kumar Sinha

Software engg unit 4
Software engg unit 4 Software engg unit 4
Software engg unit 4
Vivek Kumar Sinha
 
Software engg unit 3
Software engg unit 3 Software engg unit 3
Software engg unit 3
Vivek Kumar Sinha
 
Software engg unit 2
Software engg unit 2 Software engg unit 2
Software engg unit 2
Vivek Kumar Sinha
 
Software engg unit 1
Software engg unit 1 Software engg unit 1
Software engg unit 1
Vivek Kumar Sinha
 
Data structure
Data structureData structure
Data structure
Vivek Kumar Sinha
 
Mathematics basics
Mathematics basicsMathematics basics
Mathematics basics
Vivek Kumar Sinha
 
E commerce 5_units_notes
E commerce 5_units_notesE commerce 5_units_notes
E commerce 5_units_notes
Vivek Kumar Sinha
 
B.ped
B.pedB.ped
Subject distribution
Subject distributionSubject distribution
Subject distribution
Vivek Kumar Sinha
 
Revision report final
Revision report finalRevision report final
Revision report final
Vivek Kumar Sinha
 
Lession plan mis
Lession plan misLession plan mis
Lession plan mis
Vivek Kumar Sinha
 
Lession plan dmw
Lession plan dmwLession plan dmw
Lession plan dmw
Vivek Kumar Sinha
 
Faculty planning
Faculty planningFaculty planning
Faculty planning
Vivek Kumar Sinha
 
Final presentation on computer network
Final presentation on computer networkFinal presentation on computer network
Final presentation on computer network
Vivek Kumar Sinha
 
Np syllabus summary
Np syllabus summaryNp syllabus summary
Np syllabus summary
Vivek Kumar Sinha
 
Internet of things
Internet of thingsInternet of things
Internet of things
Vivek Kumar Sinha
 
Induction program 2017
Induction program 2017Induction program 2017
Induction program 2017
Vivek Kumar Sinha
 
Vivek
VivekVivek
E magzine et&amp;t
E magzine et&amp;tE magzine et&amp;t
E magzine et&amp;t
Vivek Kumar Sinha
 
Mechanical engineering department (1)
Mechanical engineering department (1)Mechanical engineering department (1)
Mechanical engineering department (1)
Vivek Kumar Sinha
 

More from Vivek Kumar Sinha (20)

Software engg unit 4
Software engg unit 4 Software engg unit 4
Software engg unit 4
 
Software engg unit 3
Software engg unit 3 Software engg unit 3
Software engg unit 3
 
Software engg unit 2
Software engg unit 2 Software engg unit 2
Software engg unit 2
 
Software engg unit 1
Software engg unit 1 Software engg unit 1
Software engg unit 1
 
Data structure
Data structureData structure
Data structure
 
Mathematics basics
Mathematics basicsMathematics basics
Mathematics basics
 
E commerce 5_units_notes
E commerce 5_units_notesE commerce 5_units_notes
E commerce 5_units_notes
 
B.ped
B.pedB.ped
B.ped
 
Subject distribution
Subject distributionSubject distribution
Subject distribution
 
Revision report final
Revision report finalRevision report final
Revision report final
 
Lession plan mis
Lession plan misLession plan mis
Lession plan mis
 
Lession plan dmw
Lession plan dmwLession plan dmw
Lession plan dmw
 
Faculty planning
Faculty planningFaculty planning
Faculty planning
 
Final presentation on computer network
Final presentation on computer networkFinal presentation on computer network
Final presentation on computer network
 
Np syllabus summary
Np syllabus summaryNp syllabus summary
Np syllabus summary
 
Internet of things
Internet of thingsInternet of things
Internet of things
 
Induction program 2017
Induction program 2017Induction program 2017
Induction program 2017
 
Vivek
VivekVivek
Vivek
 
E magzine et&amp;t
E magzine et&amp;tE magzine et&amp;t
E magzine et&amp;t
 
Mechanical engineering department (1)
Mechanical engineering department (1)Mechanical engineering department (1)
Mechanical engineering department (1)
 

Recently uploaded

Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
camseq
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
nooriasukmaningtyas
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
Dr Ramhari Poudyal
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
Victor Morales
 
Series of visio cisco devices Cisco_Icons.ppt
Series of visio cisco devices Cisco_Icons.pptSeries of visio cisco devices Cisco_Icons.ppt
Series of visio cisco devices Cisco_Icons.ppt
PauloRodrigues104553
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
heavyhaig
 
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTSHeap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Soumen Santra
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
manasideore6
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
Madan Karki
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Christina Lin
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
Fundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptxFundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptx
manasideore6
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
symbo111
 
Water billing management system project report.pdf
Water billing management system project report.pdfWater billing management system project report.pdf
Water billing management system project report.pdf
Kamal Acharya
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
ydteq
 
Low power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniquesLow power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniques
nooriasukmaningtyas
 
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
dxobcob
 
sieving analysis and results interpretation
sieving analysis and results interpretationsieving analysis and results interpretation
sieving analysis and results interpretation
ssuser36d3051
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
drwaing
 
Online aptitude test management system project report.pdf
Online aptitude test management system project report.pdfOnline aptitude test management system project report.pdf
Online aptitude test management system project report.pdf
Kamal Acharya
 

Recently uploaded (20)

Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
 
Series of visio cisco devices Cisco_Icons.ppt
Series of visio cisco devices Cisco_Icons.pptSeries of visio cisco devices Cisco_Icons.ppt
Series of visio cisco devices Cisco_Icons.ppt
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
 
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTSHeap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
Fundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptxFundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptx
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
 
Water billing management system project report.pdf
Water billing management system project report.pdfWater billing management system project report.pdf
Water billing management system project report.pdf
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
 
Low power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniquesLow power architecture of logic gates using adiabatic techniques
Low power architecture of logic gates using adiabatic techniques
 
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
一比一原版(Otago毕业证)奥塔哥大学毕业证成绩单如何办理
 
sieving analysis and results interpretation
sieving analysis and results interpretationsieving analysis and results interpretation
sieving analysis and results interpretation
 
digital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdfdigital fundamental by Thomas L.floydl.pdf
digital fundamental by Thomas L.floydl.pdf
 
Online aptitude test management system project report.pdf
Online aptitude test management system project report.pdfOnline aptitude test management system project report.pdf
Online aptitude test management system project report.pdf
 

Mech nacp lab

  • 1. Shri Rawatpura Sarkar Institute of Technology-II New Raipur (C.G.) 1 DepartmentofMechanicalEngineering–4th Sem.PreparebyMsSwagitaDwivedi Experiment No. 1 Aim:-Write a C-Program to calculate the area & Perimeter of the rectangle and the area & circumference of the circle. The length and breadth of a rectangle and radius of a circle are input through keyboard. /* Program for finding area & circumference */ #include<stdio.h> #include<conio.h> #define pi 3.14 int main() { float r,l,b,area,perimeter,circum,areac; printf("enter the radius of circletlength breadth of rectanglen"); scanf("%f %f %f",&r,&l,&b); circum=2*pi*r; areac=pi*r*r; area=l*b; perimeter=2*l+2*b; printf("Area and circumference of circle is =%ft%fnnn",areac,circum); printf("Area and Perimeter of rectangle is =%ft%f",area,perimeter); getch(); }
  • 2. Shri Rawatpura Sarkar Institute of Technology-II New Raipur (C.G.) 2 DepartmentofMechanicalEngineering–4th Sem.PreparebyMsSwagitaDwivedi /* Output */ enter the radius of circle length breadth of rectangle 5 3 4 Area and circumference of circle is =78.500000 31.400000 Area and Perimeter of rectangle is =12.000000 14.000000
  • 3. Shri Rawatpura Sarkar Institute of Technology-II New Raipur (C.G.) 3 DepartmentofMechanicalEngineering–4th Sem.PreparebyMsSwagitaDwivedi Experiment No. 2 Aim:-Write a C-Program to determine whether the character entered through a keyboard is a capital letter ,a small case letter, a digit or a special symbol. /* Program to whether the character entered through a keyboard is a capital letter ,a small case letter, a digit or a special symbol.*/ #include<stdio.h> #include<conio.h> int main() { char ch; printf("Enter any charactern"); scanf("%c",&ch); if(ch>=65 && ch<=91) printf("Entered character is capital case letter"); else if(ch>=97 && ch<=123) printf("Entered character is small case letter"); else if(ch>=48 && ch<=57) printf("Entered character is Digit"); else printf("Entered character is special symbol"); getch(); } /* Output */ Enter any character
  • 4. Shri Rawatpura Sarkar Institute of Technology-II New Raipur (C.G.) 4 DepartmentofMechanicalEngineering–4th Sem.PreparebyMsSwagitaDwivedi p Entered character is small case letter Experiment No. 3 Aim:-Write a program which has the following options: a) Factorial of a number b) Prime or not c) Odd or Even /* Menu Driven Program*/ #include<stdio.h> #include<conio.h> int main() { int ch,fact=1,num,i; printf("Enter any numbernn"); scanf("%d",&num); printf("nEnter your chice from 1 to 3nn"); printf("Factorial of a number.............1nn"); printf("Prime or not......................2nn"); printf("Odd or even.......................3nn"); scanf("%d",&ch); switch(ch) { case 1: for(i=1;i<=num;i++) fact= fact*i; printf("factorial of given number is = %d",fact); break; case 2:
  • 5. Shri Rawatpura Sarkar Institute of Technology-II New Raipur (C.G.) 5 DepartmentofMechanicalEngineering–4th Sem.PreparebyMsSwagitaDwivedi for(i=2;i<num;i++) { if(num%i==0) { printf("Entered number is not primen"); break; } } if(num==i) printf("number is primen"); break; case 3: if(num%2==0) printf("Enter number is even"); else printf("Enter number is Odd"); break; default: printf("Out of range"); break; getch(); } } /* Output */ Enter any number 5
  • 6. Shri Rawatpura Sarkar Institute of Technology-II New Raipur (C.G.) 6 DepartmentofMechanicalEngineering–4th Sem.PreparebyMsSwagitaDwivedi Enter your chice from 1 to 3 Factorial of a number.............1 Prime or not......................2 Odd or even.......................3 1 factorial of given number is = 120 Enter any number 5 Enter your chice from 1 to 3 Factorial of a number.............1 Prime or not......................2 Odd or even.......................3 2 number is prime Enter any number 5 Enter your chice from 1 to 3 Factorial of a number.............1 Prime or not......................2 Odd or even.......................3
  • 7. Shri Rawatpura Sarkar Institute of Technology-II New Raipur (C.G.) 7 DepartmentofMechanicalEngineering–4th Sem.PreparebyMsSwagitaDwivedi 3 Enter number is Odd Experiment No. 4 Aim:-Write a C-Program to sort an array using bubble sort technique. /*Program to sort an array using bubble sort*/ #include<stdio.h> #include<conio.h> int main() { int i,j,num,a[10],temp; printf("enter total number to store in arrayn"); scanf("%d",&num); printf("enter nummbersn"); for(i=0;i<num;i++) scanf("%d",&a[i]); for(i=0;i<num;i++) { for(j=0;j<num-i;j++) { if(a[j]>a[j+1]) { temp=a[j]; a[j]=a[j+1]; a[j+1]=temp; } } } printf("stored array using bubble sortn "); for(i=0;i<num;i++) printf("%dt",a[i]);
  • 8. Shri Rawatpura Sarkar Institute of Technology-II New Raipur (C.G.) 8 DepartmentofMechanicalEngineering–4th Sem.PreparebyMsSwagitaDwivedi getch(); } /* Output */ enter total number to store in array 7 enter nummbers 12 15 6 8 3 9 5 stored array using bubble sort 3 5 6 8 9 12 15
  • 9. Shri Rawatpura Sarkar Institute of Technology-II New Raipur (C.G.) 9 DepartmentofMechanicalEngineering–4th Sem.PreparebyMsSwagitaDwivedi Experiment No. 5 Aim:-Write a program to find the roots of an equation using Newton Raphson Method. /* Program for Newton Raphson Method*/ #include<stdio.h> #include<conio.h> #include<math.h> float f(float x) { return x*log10(x) - 1.2; } float df (float x) { return log10(x) + 0.43429; } int main() { int itr, maxmitr; float h, x0, x1, allerr; printf("nEnter x0, allowed error and maximum iterationsn"); scanf("%f %f %d", &x0, &allerr, &maxmitr); for (itr=1; itr<=maxmitr; itr++) { h=f(x0)/df(x0); x1=x0-h; printf(" At Iteration no. %3d, x = %9.6fn", itr, x1); if (fabs(h) < allerr) {
  • 10. Shri Rawatpura Sarkar Institute of Technology-II New Raipur (C.G.) 10 DepartmentofMechanicalEngineering–4th Sem.PreparebyMsSwagitaDwivedi printf("After %3d iterations, root = %8.6fn", itr, x1); return 0; } x0=x1; } printf(" The required solution does not converge or iterations are insufficientn"); getch(); } /* Output */ Enter x0, allowed error and maximum iterations 2 4 4 At Iteration no. 1, x = 2.813170 After 1 iterations, root = 2.813170
  • 11. Shri Rawatpura Sarkar Institute of Technology-II New Raipur (C.G.) 11 DepartmentofMechanicalEngineering–4th Sem.PreparebyMsSwagitaDwivedi Experiment No. 6 Aim:-Write a program to find the solution of differential equation by Runge Kutta Equation. #include<stdio.h> #include<conio.h> #include<math.h> float f(float x,float y); int main() { float x0,y0,m1,m2,m3,m4,m,y,x,h,xn; printf("Enter x0,y0,xn,h:"); scanf("%f %f %f %f",&x0,&y0,&xn,&h); x=x0; y=y0; printf("nnXttYn"); while(x<xn) { m1=f(x0,y0); m2=f((x0+h/2.0),(y0+m1*h/2.0)); m3=f((x0+h/2.0),(y0+m2*h/2.0)); m4=f((x0+h),(y0+m3*h)); m=((m1+2*m2+2*m3+m4)/6); y=y+m*h; x=x+h; printf("%ft%fn",x,y); }
  • 12. Shri Rawatpura Sarkar Institute of Technology-II New Raipur (C.G.) 12 DepartmentofMechanicalEngineering–4th Sem.PreparebyMsSwagitaDwivedi } float f(float x,float y) { float m; m=(x-y)/(x+y); return m; getch(); } /* Output */ Enter x0,y0,xn,h:3 4 5 6 X Y 9.000000 4.909602
  • 13. Shri Rawatpura Sarkar Institute of Technology-II New Raipur (C.G.) 13 DepartmentofMechanicalEngineering–4th Sem.PreparebyMsSwagitaDwivedi Experiment No. 7 Aim:-Write a program to practice one of the numerical Integration Method. /* SIMPSON'S 1/3 RULE Integration method*/ #include<stdio.h> #include<conio.h> #include<math.h> void main() { float x[10],y[10],sum=0,h,temp; int i,n,j,k=0; float fact(int); clrscr(); printf("nhow many record you will be enter: "); scanf("%d",&n); for(i=0; i<n; i++) { printf("nnenter the value of x%d: ",i); scanf("%f",&x[i]); printf("nnenter the value of f(x%d): ",i); scanf("%f",&y[i]); } h=x[1]-x[0]; n=n-1; sum = sum + y[0]; for(i=1;i<n;i++)
  • 14. Shri Rawatpura Sarkar Institute of Technology-II New Raipur (C.G.) 14 DepartmentofMechanicalEngineering–4th Sem.PreparebyMsSwagitaDwivedi { if(k==0) { sum = sum + 4 * y[i]; k=1; } else { sum = sum + 2 * y[i]; k=0; } } sum = sum + y[i]; sum = sum * (h/3); printf("nn I = %f ",sum); getch(); } /* Output */ how many record you will be enter: 5 enter the value of x0: 0 enter the value of f(x0): 1 enter the value of x1: 0.25 enter the value of f(x1): 0.8
  • 15. Shri Rawatpura Sarkar Institute of Technology-II New Raipur (C.G.) 15 DepartmentofMechanicalEngineering–4th Sem.PreparebyMsSwagitaDwivedi enter the value of x2: 0.5 enter the value of f(x2): 0.6667 enter the value of x3: 0.75 enter the value of f(x3): 0.5714 enter the value of x4: 1 enter the value of f(x4): 0.5 I = 0.693250
  • 16. Shri Rawatpura Sarkar Institute of Technology-II New Raipur (C.G.) 16 DepartmentofMechanicalEngineering–4th Sem.PreparebyMsSwagitaDwivedi