Recent Post

3/recentposts

This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

Thursday, February 22, 2018

GENERAL QUESTIONS-GK #1

1.   Which is the heaviest snake?
      Green anaconda
2.   Which country is called the country of temples?
      Nepal
3.   Which is the biggest rock?
      Uluru
 4.  Which is the biggest continent?
      Asia
5.  Which is the smallest continent?
      Australia
6.   Which continent is called Peninsula of peninsulas?
      Europe
7.   Which is the biggest ocean?
       Pacific
8.    Which is the first country to use post card?
       Austria
9.   Which is the country to use flag first?
       Denmark
10.  In which country no snakes are found?
       Iceland
11. Which is the independence day of USA?
       4th July
12. Which is the country which has never been under the rule of any country?
       Nepal
13. When India became independent?
       15th August, 1947
14. Which is the national flower of Japan?
      Chrysanthemums
15. When children day is celebrated in Japan?
       5th May
16. Which substance is called universal solvent?
       Water
17. Which is the oldest flower?
      Magnolia
18. Which is the poisonous snake?
       Black mamba
19. Which blood is universal donor?
      “O”
20. Which blood is universal receiver?
      “AB”
21. Who is known as the father of science?
     Albert Ainstine
22. Which country has the highest HDI?
      Norway
23. When was WTO established?
      1995 1st January
24. What is full form of FBI?
       Federal Bureau of Investigation
25. Give full form of CID.
       Crime Investigation Department
26. Which country is called the land of warriors?
       Nepal
27. Who discovered hydrogen?
       Henry Cavendish
28. Who discovered china?
      Marco polo
29. Who discovered India?
      Vasco-co-de-gama
30. Which is the biggest flying ocean bird?
     Albatross
31. Which is the heaviest bird?
      Paauw (kfj) of South Africa
32. Who is the king of fish?
      Shark
33. Which is the first bird of world?
      Archaeopteryx
34. Which is the oldest city of the world?
      Zeriko
35. Which is the first satellite of the world?
       Sputnik
36. When was the first satellite of the world sent to space?
      4th October 1957
37. Which is the oldest temple of Nepal?
      Swyambhunath
38. Which temple of Nepal lies at the highest altitude?
      Muktinath
39. Who is known as the prince of Experiment?
      Michael
40. Who wrote Mahabharata?
     Ganesh
41. Who told Mahabharata?
       Veda vayas
42. Which is the first hovercraft to run on diesel?
      AP-188
43. Which is the most dangerous bird in the world?
       Cassowary
44. Which is the most dangerous animal in the world?
       Sea wasp
45. How many bones are there in the snakes’ body?
      300
46. Which is the national game of china?
     Table tennis
47. Which is the most spoken language in the world?
      Chinese
48. What is the study of fossils called?
     Plane otology
49. Which animal doesn’t drink water through out the life?
     Kangaroo rat
50. Who and when invented lie detector (Poly graph) machine?
      John A. Larson in 1921
51. Which is the biggest temple of the world?
     Angkor watt of Cambodia
52. Who has prepared the map of Eiffel tower?
        Alexander Gustave Eiffel
53. How many stairs are there in Eiffel tower?
        1792
54. When was Eiffel tower made?
     31st March 1889
55. What is the height of Eiffel tower?
      322m (1060 ft.)
56. How much time was taken to build Eiffel tower?
       2 years 2months 2days
57. What is the area of Bermuda triangle?
      3,900,000 sq. km. (1,500,000 sq. miles)
58.  Which is the lightest thing of the world?
       Lithium
59. Which is the heaviest thing of the world?
       Osmium
60.  When was Taj Mahal built?
      1632 A.D.
61. On the bank of which river Taj Mahal lies?
      Yamuna
62. How many workers were needed to build Taj Mahal?
       20 thousand
63. How much time were take to build Taj Mahal?
      20 years
64. Due to which protein the milk looks white?
       Casein
65. Give the full form of Laser.
      Light Amplification by Stimulated Emission of Radiation
66. Which mountain changes its color?
       Aayars (cfo;{) rock of 335m of Australia
67. Who found this mountain and when?
      W. G. Gosse in 1875 A.D
68. Give the full form of ECG.
       Electrocardiography
69. Which acid is called the king of acid?
       Sulphuric acid
70. Which continent is called New World?
       North America
71. Due to what sunflowers face towards the sun?
       Auxin
 72. Which is the first Newspaper of Nepal?
         Sudasagar
73. Which is the biggest delta?
        Sundarban delta (Ganga and Bhramaputra delta)
74. Which is the biggest fresh water lake?
        Great Superior Lake of North America
75. Which continent is called the continent of extremes?
        Asia
 76. Which is the longest river of Europe?
         Volga (3500Km)
77.    Which is the largest river of Europe?
Denube
78.    Which is the biggest island of the world?
Australia
79.    Which continent is called the land of darkness?
Africa
80.    Which is the highest peak of Europe?
Mt. Elbrus of 5630m
81.    Which is the highest peak of Australia?
Mt. Kosciusko of 2228m
82.    What is the area of Australia?
76, 86,420 sq. km
83. What is the area of Asia?
       4, 43, 87,000 sq. km
84. Which is the highest plateau?
       Plateau of Tibet of 5100m
85. Which is the largest coral reef in the world?
        The Great Barrier Reef of 2000 km
86.  Which is the oldest stupa of Nepal?
            Ashok stupa
87. Who is called the father of industrialization of Nepal?
       Juddha shumsher Rana
88. Who is called the father of electricity?
       Ohm
89. Who is the largest producer of rice and cotton?
       China
90. Who is the largest producer of Rubber?
        Malaysia
91. Who is the second largest producer of rubber?
       Indonesia
92. Who is the largest producer of egg in the world?
      China
93. Which is the largest sugarcane producing country?
       India
94. Which is the oldest National park of Nepal?
        Chitwan National Park
95. Which is the oldest and largest National Park of the world?
      Yellow Stone park of USA
96. Which is the National game of USA?
       Base ball
97. Which country does not have National Anthem?
        Switzerland
98. Which is the largest country of the world?
       Russia
99. Which planet is called the Red planet?
       Mars
100. Which is the largest planet?
        Jupiter
101. Which English alphabet is used mostly?
         “E”
102. Which English alphabet is used least?
         “Q”
103. Which is the third largest continent of the world?
        North America
104. Which is the fourth largest continent of the world?
         South America
105. Which continent is called plateau of plateaus?
         Africa
106. Which is the largest desert of the world?
          Sahara desert
107. How many appellate courts are there in Nepal?
         16
108. Which is the longest unbroken mountain chain?
         Andes
109. Which is the highest mountain peak of Africa?
          Mount Kilimanjaro (5895m)
110. When did First World War took place?
           1914 A.D.
111. When did Second World War took place?
          1939 A.D.
112. Which place is called the zoo of the world?
          Congo basin
113. Who is known as the father of medicines?
            Hippocrates
114. Who invented Uranium?
            Martin Heinrich Kalproth in 1789 A.D.
115. Which is the first Spaceship of America?
            Explorer-1 sent on 31 January 1958 A.D.
116. Which is the largest river of Nepal?
            Koshi
117. Which is the longest river of Nepal?
            Karnali
118. Which is the largest district of Nepal?
            Dolpa
119. Which is smallest district of Nepal?
            Bhaktapur
120. Who developed WWW (World Wide Web)?
      Tim-Berners-Lee       
121.  What is the full form of HTTP?
            Hyper Text Transfer Protocols
122.  What is the full form of HTML?
            Hyper Text Markup Language
123.   Which is the National Game of Australia?
      Cricket

       













Share:

Sunday, January 21, 2018

NEA AND NEC REPORT

NEA (Nepal Engineers’ Association)

Background
Nepal Engineers' Association (NEA) is an independent nonprofit organization of Nepalese engineers, registered under the Social Service Act of the Government of Nepal. It was established in 1962. Today, it represents 19792 engineers, belonging to various engineering disciplines including architects, civil, electrical, mechanical, electronics etc and coming from both the public and private sector economies. NEA is governed by an elected executive council of 15 members, led by the President of the association for a tenure of two years.

Presently, NEA is a member of World Federation of Engineering Organizations (WFEO) and was instrumental in the establishment of Federation of Engineering Institute of South and Central Asia (FEISCA). NEA has recently joined the Asian Civil Engineering Coordinating Council (ACECC) and have functional bilateral relations with Institution of Engineers Bangladesh, India, Malaysia, Pakistan, Sri Lanka, Institution of Civil Engineers (ICE-UK), American Society of Civil Engineers (ASCE), Japanese Society of Civil Engineers (JSCE) and the Korean Society of Civil Engineers (KSCE).

Objectives
1.       To promote development of the engineering science and technology in Nepal.
2.       To promote fellowship goodwill and cooperation assistance among the Nepalese engineers and safeguard their rights and interests.
3.       By utilizing, to the highest extent possible, the participation of the national engineering manpower of the country in the national development activities of Nepal, make effort towards ending foreign dependency in this regard.
4.       To continuously enhance the highest professional ideals among the members and widen it.
5.       To develop relations, fellowship and goodwill with international engineering associations and institutions.

Major activities of NEA.
1. Publish journals, Manuals, articles and newsletters on various fields of Engineering.
2. Organize conferences, workshop and paper presentation programs to foster interaction of engineers         
     of various fields.
3. Conduct major talk programs form highly acclaimed professionals on engineering issues.
4. Recognize and award distinguished professionals for their contribution.
5. Enhance safeguard of professional right of engineers 6. Cooperate and organize joint activities with  
     foreign and domestic professional organizations.

Contacts for NEA
Nepal Engineers' Association
Pulchowk, Lalitpur
00977-1-5010251, 5010252
00977-1-5010253




NEC (Nepal Engineering Council)

Background
It can be said that Nepal entered a modern phase in engineering after the political change in the sixties. Engineering activities began to contribute to the development of the country and the engineering profession started to gain respect in the society.

it was expected that nearlt 3000 engineers would be graduating from local engineering colleges every year with nearlty an equal amount graduating from colleges abroad. So, a need was felt for an organization to manage the engineering profession. Therefore, to make the engineering profession more effective, Nepal Engineering Council was formed under the Nepal Engineering Council Act, 2055 promulgated by His Majesty the King on B.S. 2055/11/27 (11th March, 1999 A.D.). As per the Act, NEC has been vested with the statutory authority for the planning, coordinated development and monitoring of engineering profession and education in the country. NEC Act 2055 gives an outline on the formation of the Council, its tenture and the roles and responsibilities of the Chairman, Vice Chairman and the Registrar.

Nepal Engineering Council Rules, 2057 has also been prepared and approved by His Majesty's Government as per the provision of Clause 37 of the Act. It defines the registration of engineers into three categories as well as the formats for application:
a) General Registered Engineer
b) Professional Engineer
c) non - Nepali Registered Engineer

NEC Rules 2057 also lays down the professional code of conduct for engineers registered with the Council. The first Executive Council was formed on Magh 2056 under the chairmanship of Er. Ram Babu Sharma and completed its tenture on Magh 2060.

Objectives of NEC
The objective of Nepal Engineering Council is to make the engineering profession effective by mobilizing it in a more systematic and scientific way and also to register the engineers as per their qualifications. Its duties and responsibilities are :
1) To prepare policies, plans and programs for the smooth functioning of the
profession and to execute them
2) To set norms and standards for engineering education in Nepal
3) To grant permission and approval to carry out engineering education to those engineering colleges and institutions that meet the required norms and standards and to honor their degrees and certificates
4) To monitor and inspect the quality of engineering education provided by the
engineering colleges and institutions
5) To fix the qualification necessary in order to practice engineering profession and to register their name in the Council
6) To remove their name from the registration of the engineering council if found to violate the code of ethics.






  Fig. Organizational Chart of NEC









Licensing of engineers
Licensing is one of the means of regulating the profession. The organizations providing engineering services, for example, are expected to obtain approval from professional organizations before starting their business, apart from fulfilling the legal requirements. The Federation of Contractors’ Association of Nepal (FCAN) classifies its members into different categories/classes like A, B, C and D; the contractors of each category are limited in the financial amount of work they can bid for.
Licensing for individual engineers is provided by NEC, in the form of registration. As per clause 11 of NEC Act, “no person shall practice the engineering profession without getting his/her name registered in the Council”. Offenders are subject to fine to Rs. 3000 or jail up to three months or both.

Two of the objectives of NEC related to the licensing of engineering professionals are:

·         To fix the qualification necessary in order to practice engineering profession and to register their name in the Council
·         To remove their name from the registration of the engineering council if found to violate the code of ethics.

1. Accreditation of certificates of academic qualification
2. Recognition of the academic institution
3. Professional code of conduct Disciplinary

Registration categories
1.General engineer                                         A
2.Professional engineer                                  B
3. Foreign engineer                                        C

Registration requirement
1. Application in approved format
2. Copies of certificate of academic qualification
3. Enclosed registration fee
4. Other relevant document

 VISION:
 The vision of NEC is to make the engineering profession effective by mobilizing it in a more systematic and scientific and also to register the engineers as per their qualifications.










Differences between NEC and NEA
NEC
NEA
Statutory body, established under NEC Act, in 1999
An NGO, established in 1962
Must register before practicing engineering profession
Registration/membership is voluntary
Executive body by election and nomination
Executive body by election
Evaluates and approves establishment of academic institutes offering engineering programs
No such provision
Offers different categories of engineering profession: general, professional, foreign
No such provision
Monitors academic institutes offering engineering programs (every year for temporary approval and every other year for permanent approval), and cancels approval if found not up to standard
No such provision
The directives and code of conduct issued are mandatory
The directives and code of conduct issued are voluntary


Contacts of NEC
Nepal Engineering Council
Naxal, Kathmandu
Phone no. :4420655, 4420656
Fax:01-4422099
Email address : necgov@ntc.net.np
For More Information Please Dial 
PSTN Directorate Audio Notice 
No: 1618014420656


Share:

LAGRANGE FORMULA/METHOD IN C PROGRAMMING

//Lagrange formula
#include<stdio.h>
void main()
{
    int n,i,j;
    float x[15],y[15],prod,sum=0,a;
    printf("Enter no. of data and a : ");
    scanf("%d%f",&n,&a);
    for(i=1;i<=n;i++)
    {
        printf("Enter x%d,y%d : ",i,i);
        scanf("%f%f",&x[i],&y[i]);
    }
    for(i=1;i<=n;i++)
    {
        prod=1;
        for(j=1;j<=n;j++)
        {
            if(i!=j)
            {
                prod=prod*(a-x[j])/(x[i]-x[j]);
            }
        }
        sum=sum+prod*y[i];
    }
    printf("y(%f) = %f ",a,sum);
}

Share:

GAUSS JODON INVERSE IN C PROGRAMMING


#include<stdio.h>
#include<stdlib.h>
void main()
{
    int i,j,k,n;
    float a[15][15],d,r;
    printf("Enter order of matrix :");
    scanf("%d",&n);
    for(i=1;i<=n;i++)
    {
        for(j=1;j<=n;j++)
        {
            printf("Enter a[%d][%d] : ",i,j);
            scanf("%f",&a[i][j]);
        }
    }
    for(i=1;i<=n;i++)
    {
        for(j=n+1;j<=2*n;j++)
        {
            if(j==n+i)
            {
                a[i][j]=1;
            }
            else
            {
                a[i][j]=0;
            }
        }
    }
    for(j=1;j<=n;j++)
    {
        if(a[j][j]==0)
        {
            printf("Error");
            exit(0);
        }
        for(i=1;i<=n;i++)
        {
            if(i!=j)
            {
                r=(a[i][j])/(a[j][j]);
                for(k=1;k<=2*n;k++)
                {
                    a[i][k]=a[i][k]-r*a[j][k];
                }
            }
        }
    }
    for(i=1;i<=n;i++)
    {
        d=a[i][i];
        for(j=1;j<=2*n;j++)
        {
            a[i][j]=a[i][j]/d;
        }
    }
    for(i=1;i<=n;i++)
    {
        for(j=1;j<=2*n;j++)
        {
            printf("  %f",a[i][j]);
        }
        printf("\n");
    }
}

Share:

GAUSS JORDON MEHTOD IN C PROGRAMMING

//gauss jordon
#include<stdio.h>
void main()
{
    int i,j,k,n;
    float a[15][15],x[10],r;
    printf("Enter order of matrix :");
    scanf("%d",&n);
    for(i=1;i<=n;i++)
    {
        for(j=1;j<=n+1;j++)
        {
            printf("Enter a[%d][%d] : ",i,j);
            scanf("%f",&a[i][j]);
        }
    }
    for(j=1;j<=n;j++)
    {
        for(i=1;i<=n;i++)
        {
            if(i!=j)
            {
                r=(a[i][j])/(a[j][j]);
                for(k=1;k<=n+1;k++)
                {
                    a[i][k]=a[i][k]-r*a[j][k];
                }
            }
        }
    }
    for(i=1;i<=n;i++)
    {
        x[i]=(a[i][n+1])/(a[i][i]);
        printf("x%d = %f\t",i,x[i]);
    }
}

Share:

GAUSS ELIMINATION METHOD IN C PROGRAMMING

//gauss elimination
#include<stdio.h>
void main()
{
    int i,j,k,n;
    float r,a[20][20],x[20],sum;
    printf("Enter matrix size : ");
    scanf("%d",&n);
    for(i=1;i<=n;i++)
    {
        for(j=1;j<=n+1;j++)
        {
            printf("Enter a%d%d : ",i,j);
            scanf("%f",&a[i][j]);
        }
    }
    for(j=1;j<=n-1;j++)
    {
        for(i=j+1;i<=n;i++)
        {
            r=a[i][j]/a[j][j];
            for(k=1;k<=n+1;k++)
            {
                a[i][k]=a[i][k]-r*a[j][k];
            }
        }
    }
    x[n]=a[n][n+1]/a[n][n];
    for(i=n-1;i>=1;i--)
    {
        sum=0;
        for(j=i+1;j<=n;j++)
        {
            sum=sum+a[i][j]*x[j];
        }
        x[i]=(a[i][n+1]-sum)/a[i][i];
    }
    for(i=1;i<=n;i++)
    {
        printf("x%d = %.4f\t",i,x[i]);
    }
}

Share:

SECOND DEGREE CURVE FITTING IN C PROGRAMMING

//second degree curve-fitting
#include<stdio.h>
void main()
{
    int n,i,j,k;
    float a[10][10],x[10],y[10],r;
    float sumx=0,sumx2=0,sumx3=0,sumx4=0,sumxy=0,sumx2y=0,sumy=0;
    printf("Enter no. of data : ");
    scanf("%d",&n);
    for(i=1;i<=n;i++)
    {
        printf("Enter x%d,y%d : ",i,i);
        scanf("%f%f",&x[i],&y[i]);
    }
    for(i=1;i<=n;i++)
    {
        sumx+=x[i];
        sumx2+=x[i]*x[i];
        sumx3+=x[i]*x[i]*x[i];
        sumx4+=x[i]*x[i]*x[i]*x[i];
        sumxy+=x[i]*y[i];
        sumx2y+=x[i]*x[i]*y[i];
        sumy+=y[i];
    }
    a[1][1]=a[2][2]=a[3][3]=sumx2;
    a[1][2]=a[2][3]=sumx;
    a[2][4]=sumxy;
    a[3][4]=sumx2y;
    a[3][1]=sumx4;
    a[2][1]=a[3][2]=sumx3;
    a[1][4]=sumy;
    a[1][3]=n;
    for(j=1;j<=3;j++)
    {
        for(i=1;i<=3;i++)
        {
            if(i!=j)
            {
                r=a[i][j]/a[j][j];

            for(k=1;k<=4;k++)
            {
                a[i][k]=a[i][k]-r*a[j][k];
            }
            }
        }
    }
    for(i=1;i<=3;i++)
    {
        x[i]=a[i][4]/a[i][i];
    }
    printf("a = %f\t b = %f\tc = %f",x[1],x[2],x[3]);
}

Share:

SECANT MEHTOD IN C PROGRAMMING

//secant
#include<stdio.h>
#include<math.h>
#include<stdlib.h>
float f(float x)
{
    return(pow(x,3)-2*x-5);
}

void main()
{
    float x,a,b;
    printf("Enter two initial guesses a & b : ");
    scanf("%f%f",&a,&b);
    do
    {
        if(f(a)==f(b))
        {
            printf("Denominator is zero");
            exit(0);
        }
        x=(a*f(b)-b*f(a))/(f(b)-f(a));
        a=b;
        b=x;

    }while(fabs(f(x))>0.00005);
    printf("Solution = %f, f(x)= %f",x,f(x));
}

Share:

RUNGE-KUTTA 4 (RK-4) METHOD IN C PROGRAMMING

//rk4method
#include<stdio.h>
#include<math.h>
float f(float x, float y)
{
    return (x+y);
}
void main()
{
    float x0,y0,h,x,m,m1,m2,m3,m4;
    printf("Enter x0, y0, h , x : ");
    scanf("%f%f%f%f",&x0,&y0,&h,&x);
    while(x0<x)
    {
        m1=f(x0,y0);
        m2=f(x0+h/2,y0+m1*h/2);
        m3=f(x0+h/2,y0+m3*h/2);
        m4=f(x0+h,y0+m3*h);
        m=(m1+2*m2+2*m3+m4)/6;
        y0+=h*m;
     
        x0+=h;
        printf("x = %2.4f \t\t y = %2.4f\n",x0,y0);
    }

}

Share:

NEWTON-RAPHSON METHOD IN C PROGRAMMING

//newton-raphson
#include<stdio.h>
#include<math.h>
#include<stdlib.h>
float f(float x)
{
    return(pow(x,4)-x-10);
}
float df(float x)
{
    return(4*x*x-1);
}
void main()
{
    float x,x1;
    int c=0,i;
    printf("Enter initial guess and iteration : ");
    scanf("%f%d",&x,&i);
    do
    {
        if(df(x)==0)
        {
           printf("derivative zero");
           exit(0);
        }
        x1=x-(f(x)/df(x));
        x=x1;
        c++;
        if(c==i)
        {
            printf("Root not convergence");
            exit(0);
        }

    }while(fabs(f(x))>0.00005);
    printf("Root = %f,f(x) = %f",x1,f(x1));
}

Share:

LINEAR CURVE FITTING IN C PROGRAMMING

#include<stdio.h>
void main()
{
    float a,b,sumx,sumy,sumxy,sumx2,x[50],y[50];
    int i,n;
    sumx=0;
    sumy=0;
    sumxy=0;
    sumx2=0;
    printf("Enter no. of data : ");
    scanf("%d",&n);
    for (i=0;i<n;i++)
    {
        printf("Enter x(%d) and y(%d) : ",i+1,i+1);
        scanf("%f%f",&x[i],&y[i]);
    }
    for (i=0;i<n;i++)
    {
        sumx+=x[i];
        sumy+=y[i];
        sumxy+=x[i]*y[i];
        sumx2=x[i]*x[i];
    }
    a=(sumy*sumx2-sumxy*sumx)/(n*sumx2-sumx*sumy);
    b=(sumy*sumx-n*sumxy)/(n*sumx2-sumx*sumy);
    printf("a =%f\nb=%f",a,b);
}

Share:

EXPONENTIAL CURVE FITTING IN C PROGRAMMING

#include<stdio.h>
#include<math.h>
void main()
{
    float a,b,sumx,sumy,sumxy,sumx2,x[50],y[50];
    int i,n;
    sumx=0;
    sumy=0;
    sumxy=0;
    sumx2=0;
    printf("Enter no. of data : ");
    scanf("%d",&n);
    for (i=0;i<n;i++)
    {
        printf("Enter x(%d) and y(%d) : ",i+1,i+1);
        scanf("%f%f",&x[i],&y[i]);
         y[i]=log(y[i]);
    }

    for (i=0;i<n;i++)
    {
        sumx+=x[i];
        sumy+=y[i];
        sumxy+=x[i]*y[i];
        sumx2=x[i]*x[i];
    }
    a=(sumy*sumx2-sumxy*sumx)/(n*sumx2-sumx*sumy);
    b=(-sumy*sumx+ n*sumxy)/(n*sumx2-sumx*sumy);
    a=exp(a);
    printf("a =%f\nb=%f",a,b);
}

Share:

EULER'S METHOD IN C PROGRAMMING

//euler's method
#include<stdio.h>
#include<math.h>
float f(float x, float y)
{
    return (x+y);
}
void main()
{
    float x0,y0,h,x,m,m1,m2,m3,m4;
    printf("Enter x0, y0, h , x : ");
    scanf("%f%f%f%f",&x0,&y0,&h,&x);
    while(x0<x)
    {
       
       y0+=h*f(x0,y0);
        x0+=h;
        printf("x = %2.4f \t\t y = %2.4f\n",x0,y0);
    }

}

Share:

Recent

Unordered List

Definition List

Pages

Theme Support