Hello There, Guest! RegisterLogin with Facebook
Login with Facebook

New Anna University Nov / Dec 2016 Examination Important Questions
New Anna University (UG / PG) Nov/Dec 2016 and Jan 2017 Theory , Practical Exam Timetable
>>> Anna University Sixth Semester Question Bank Collection (R2013) ECE,MECH,CSE,IT,EEE,CIVIL,EIE
>>> Anna University November/December 2015 Examination Question Papers
>>> Anna University Study Materials for all Departments
>>> Anna University Question Papers : April May June 2015 Question Papers | Nov Dec 2014 and Jan 2015 Question Papers

Register or Login to Submit Study Materials , Shoutbox and also to access Many Features !!

Vidyarthiplus Shop :: Handwritten Premium Lecture Notes
Share your Study Materials with us
Share your Study Materials with us : Click Here

Find the error - Questions by keerthana
#1
Tongue 


Debug the error its very intersting [Image: tongue.gif].Debug the program if u have the knowledge of c language

Code:
                                                          Exponential value
#include<stdio.h>
#include<conio.h>
void main()
{
double term=1,expo=1;
float x;
int i;
clrscr();
printf("Enter the exp value of x: ");
scanf("%f",&x);
for(i=1;term>=0.00001;i++);
{
term *= x/i;
expo+=term;
}
printf("\Our Exp = %f %f\n",x,expo);
getch();
}




Reply
#2

Is it right???
Code:
                                                          Exponential value
#include<stdio.h>
#include<conio.h>
void main()
{
double term=1,expo=1;
float x;
int i;
clrscr();
printf("Enter the exp value of x: ");
scanf("%f",&x);
for(i=1;term>=0.00001;i++);
{
term *= x/i;
expo+=term;
}
printf("\n Our Exp = %f %f\n",x,expo);
getch();
}


If you want to win the world, be ready to lose yourself!!


Rocky Welcomes you!!!! Sniper


Reply
#3


no for loop has terminated . It shouldnot be terminate .this is the only correction



Reply

Subscribe


Recommend on Google