This program uses the Gaussian quadrature rule to numerically estimate the integral of a function in C++. It takes a function as input, converts it from infix to postfix notation, then evaluates the postfix expression at specific points to approximate the integral. The program defines functions for the user interface, mathematical operations, and applying the Gaussian quadrature rule to calculate the integral estimate.
Numerical solution of ordinary differential equations by using Runge-Kutta Method of Order Two and Runge-Kutta Method of Order Four
How to write the C++ codes?
Numerical solution of ordinary differential equations by using Runge-Kutta Method of Order Two and Runge-Kutta Method of Order Four
How to write the C++ codes?
This program solved by Ms. Aakriti Srivastav (Guided by Jitendra Kumar (JAVA Trainer at Vtech Academy of Computers)- C | C++ | DS | JAVA | Android | Python & Oracle.
A few Programs, that are tested with compilers of respective IDEs s Bloodshed-DevC++, Visual Studio 2008, Qt 4.2. These are running successfully within console window of windows platform. So just enjoy coding. Programs in C of College days.
I am Daniel N. I am a C++ Homework Expert at cpphomeworkhelp.com. I hold a Masters in Programming from the University of Leeds, UK. I have been helping students with their homework for the past 10 years. I solve homework related to C++.
Visit cpphomeworkhelp.com or email info@cpphomeworkhelp.com. You can also call on +1 678 648 4277 for any assistance with C++ Homework.
The Roman Empire A Historical Colossus.pdfkaushalkr1407
The Roman Empire, a vast and enduring power, stands as one of history's most remarkable civilizations, leaving an indelible imprint on the world. It emerged from the Roman Republic, transitioning into an imperial powerhouse under the leadership of Augustus Caesar in 27 BCE. This transformation marked the beginning of an era defined by unprecedented territorial expansion, architectural marvels, and profound cultural influence.
The empire's roots lie in the city of Rome, founded, according to legend, by Romulus in 753 BCE. Over centuries, Rome evolved from a small settlement to a formidable republic, characterized by a complex political system with elected officials and checks on power. However, internal strife, class conflicts, and military ambitions paved the way for the end of the Republic. Julius Caesar’s dictatorship and subsequent assassination in 44 BCE created a power vacuum, leading to a civil war. Octavian, later Augustus, emerged victorious, heralding the Roman Empire’s birth.
Under Augustus, the empire experienced the Pax Romana, a 200-year period of relative peace and stability. Augustus reformed the military, established efficient administrative systems, and initiated grand construction projects. The empire's borders expanded, encompassing territories from Britain to Egypt and from Spain to the Euphrates. Roman legions, renowned for their discipline and engineering prowess, secured and maintained these vast territories, building roads, fortifications, and cities that facilitated control and integration.
The Roman Empire’s society was hierarchical, with a rigid class system. At the top were the patricians, wealthy elites who held significant political power. Below them were the plebeians, free citizens with limited political influence, and the vast numbers of slaves who formed the backbone of the economy. The family unit was central, governed by the paterfamilias, the male head who held absolute authority.
Culturally, the Romans were eclectic, absorbing and adapting elements from the civilizations they encountered, particularly the Greeks. Roman art, literature, and philosophy reflected this synthesis, creating a rich cultural tapestry. Latin, the Roman language, became the lingua franca of the Western world, influencing numerous modern languages.
Roman architecture and engineering achievements were monumental. They perfected the arch, vault, and dome, constructing enduring structures like the Colosseum, Pantheon, and aqueducts. These engineering marvels not only showcased Roman ingenuity but also served practical purposes, from public entertainment to water supply.
Honest Reviews of Tim Han LMA Course Program.pptxtimhan337
Personal development courses are widely available today, with each one promising life-changing outcomes. Tim Han’s Life Mastery Achievers (LMA) Course has drawn a lot of interest. In addition to offering my frank assessment of Success Insider’s LMA Course, this piece examines the course’s effects via a variety of Tim Han LMA course reviews and Success Insider comments.
Francesca Gottschalk - How can education support child empowerment.pptxEduSkills OECD
Francesca Gottschalk from the OECD’s Centre for Educational Research and Innovation presents at the Ask an Expert Webinar: How can education support child empowerment?
Embracing GenAI - A Strategic ImperativePeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
Synthetic fiber production is a fascinating and complex field that blends chemistry, engineering, and environmental science. By understanding these aspects, students can gain a comprehensive view of synthetic fiber production, its impact on society and the environment, and the potential for future innovations. Synthetic fibers play a crucial role in modern society, impacting various aspects of daily life, industry, and the environment. ynthetic fibers are integral to modern life, offering a range of benefits from cost-effectiveness and versatility to innovative applications and performance characteristics. While they pose environmental challenges, ongoing research and development aim to create more sustainable and eco-friendly alternatives. Understanding the importance of synthetic fibers helps in appreciating their role in the economy, industry, and daily life, while also emphasizing the need for sustainable practices and innovation.
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
Operation “Blue Star” is the only event in the history of Independent India where the state went into war with its own people. Even after about 40 years it is not clear if it was culmination of states anger over people of the region, a political game of power or start of dictatorial chapter in the democratic setup.
The people of Punjab felt alienated from main stream due to denial of their just demands during a long democratic struggle since independence. As it happen all over the word, it led to militant struggle with great loss of lives of military, police and civilian personnel. Killing of Indira Gandhi and massacre of innocent Sikhs in Delhi and other India cities was also associated with this movement.
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
11. gotoxy(24,12);
cout<<" 1ô";
gotoxy(6,13);
cout<<"Two Point Rule: ³f(x)dx ÷ f(-1/û3)+f(1/û3)";
gotoxy(24,14);
cout<<"-1õ";
gotoxy(24,16);
cout<<" 1ô";
gotoxy(6,17);
cout<<"Three Point Rule: ³f(x)dx ÷ (5/9)f(-û(3/5))+(8/9)f(0)+(5/9)f(û(3/5))";
gotoxy(24,18);
cout<<"-1õ";
apply_gaussian_quadrature_rule( );
gotoxy(6,22);
cout<<" 1ô";
gotoxy(6,24);
cout<<" -1õ";
gotoxy(6,23);
cout<<"Estimation of ³f(x)dx :";
gotoxy(6,25);
cout<<"ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ";
gotoxy(8,27);
cout<<"Estimated Integral Value (using 2-Point Rule) = "<<two_point_result;
gotoxy(8,29);
cout<<"Estimated Integral Value (using 3-Point Rule) = "<<three_point_result;
gotoxy(1,2);
}
2. Program untuk memperkirakan nilai Integral dari fungsi di poin yang diberikan dari
data yang diberikan dengan Metode Romberg di C ++ Programming
# include <iostream.h>
# include <stdlib.h>
# include <string.h>
# include <stdio.h>
# include <conio.h>
# include <math.h>
38. strcpy(Function_value,pop( ));
function_value=strtod(Function_value,&endptr);
return function_value;
}
/*************************************************************************//
/----------------------------- get_input( ) --------------------------
///*************************************************************************
/void get_input( )
{
do
{
clear_screen( );
gotoxy(6,9);
cout<<"Number of Sub-Intervals :";
gotoxy(6,10);
cout<<"ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ";
gotoxy(20,13);
cout<<"[ min. n = 2 | max. n = 12 ]";
gotoxy(6,12);
cout<<"Enter the max. number of sub-intervals = n = ";
cin>>n;
if(n<2 || n>12)
{
gotoxy(12,25);
cout<<"Error : Wrong Input. Press <Esc> to exit or any other key";
gotoxy(12,26);
cout<<" to try again.";
n=int(getche( ));
if(n==27)
exit(0);
}
}
while(n<2 || n>12);
gotoxy(6,16);
cout<<"Enter the value of Lower limit = a = ";
39. cin>>a;
gotoxy(6,18);
cout<<"Enter the value of Upper Limit = b = ";
cin>>b;
h=((b-a)/n);
gotoxy(6,24);
cout<<"Input Mode :";
gotoxy(6,25);
cout<<"ÍÍÍÍÍÍÍÍÍÍÍÍ";
gotoxy(8,28);
cout<<"Press : ";
gotoxy(10,30);
cout<<"- 'Y' or <Enter> to enter function";
gotoxy(10,32);
cout<<"- 'N' or <Any other key> to enter values of the function";
gotoxy(8,35);
cout<<"Enter your choice : ";
char Choice=NULL;
Choice=getch( );
if(Choice=='y' || Choice=='Y' || int(Choice)==13)
{
choice=1;
gotoxy(28,35);
cout<<"Y";
}
else
{
gotoxy(28,35);
cout<<"N";
}
gotoxy(25,43);
cout<<"Press any key to continue...";
getch( );
40. if(choice)
{
clear_screen( );
gotoxy(6,10);
cout<<"Non-Linear Function :";
gotoxy(6,11);
cout<<"ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ";
gotoxy(6,37);
cout<<"Note : Write the function with proper Braces ( ) e.g; 2x+3 as (2*x)+3";
gotoxy(6,40);
cout<<"Available Operators : ^ (raised to power) , * , / , + , -";
gotoxy(6,42);
cout<<"Available Operands : x , e , sinx , cosx , tanx , lnx , logx ,";
gotoxy(6,44);
cout<<" n = any number";
gotoxy(6,14);
cout<<"Enter the Function : f(x) = ";
cin>>Fx;
convert_ie_to_pe(Fx);
}
clear_screen( );
gotoxy(6,9);
cout<<"Data Points & Values of Function :";
gotoxy(6,10);
cout<<"ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ";
gotoxy(25,12);
cout<<"ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿";
gotoxy(25,13);
cout<<"³ x ³ f(x) ³";
gotoxy(25,14);
cout<<"ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´";
gotoxy(25,15);
cout<<"³ ³ ³";
43. gotoxy(10,13);
cout<<"³f(x)dx ÷ (h/3)(f0+fn) + (2h/3)[f2+f4+...+f(n-2)] +";
gotoxy(50,15);
cout<<"(4h/3)[f1+f3+...+f(n-1)]";
gotoxy(8,14);
cout<<" aõ";
gotoxy(6,17);
cout<<" bô";
gotoxy(6,19);
cout<<" aõ";
gotoxy(6,18);
cout<<"Estimation of ³f(x)dx :";
gotoxy(6,20);
cout<<"ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ";
gotoxy(8,23);
cout<<"Estimated Integral Value = ";
cout<<estimated_value;
gotoxy(1,2);
}
4. Program untuk memperkirakan nilai Integral dari fungsi di poin yang diberikan dari
data yang diberikan menggunakan aturan trapesium di C ++ Programming
# include <iostream.h>
# include <stdlib.h>
# include <string.h>
# include <stdio.h>
# include <conio.h>
# include <math.h>
constint max_size=13;
int n=0;
int top=-1;
int choice=0;
longdouble h=0;
longdouble a=0;
longdouble b=0;
longdouble estimated_value=0;
52. function_value=strtod(Function_value,&endptr);
return function_value;
}
/*************************************************************************//
/----------------------------- get_input( ) --------------------------
///*************************************************************************
/void get_input( )
{
do
{
clear_screen( );
gotoxy(6,9);
cout<<"Number of Sub-Intervals :";
gotoxy(6,10);
cout<<"ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ";
gotoxy(20,13);
cout<<"[ min. n = 3 | max. n = 12 ]";
gotoxy(6,12);
cout<<"Enter the max. number of sub-intervals = n = ";
cin>>n;
if(n<3 || n>12)
{
gotoxy(12,25);
cout<<"Error : Wrong Input. Press <Esc> to exit or any other key";
gotoxy(12,26);
cout<<" to try again.";
n=int(getche( ));
if(n==27)
exit(0);
}
}
while(n<3 || n>12);
gotoxy(6,16);
cout<<"Enter the value of Lower limit = a = ";
cin>>a;
53. gotoxy(6,18);
cout<<"Enter the value of Upper Limit = b = ";
cin>>b;
h=((b-a)/n);
gotoxy(6,24);
cout<<"Input Mode :";
gotoxy(6,25);
cout<<"ÍÍÍÍÍÍÍÍÍÍÍÍ";
gotoxy(8,28);
cout<<"Press : ";
gotoxy(10,30);
cout<<"- 'Y' or <Enter> to enter function";
gotoxy(10,32);
cout<<"- 'N' or <Any other key> to enter values of the function";
gotoxy(8,35);
cout<<"Enter your choice : ";
char Choice=NULL;
Choice=getch( );
if(Choice=='y' || Choice=='Y' || int(Choice)==13)
{
choice=1;
gotoxy(28,35);
cout<<"Y";
}
else
{
gotoxy(28,35);
cout<<"N";
}
gotoxy(25,43);
cout<<"Press any key to continue...";
getch( );
if(choice)
{
54. clear_screen( );
gotoxy(6,10);
cout<<"Non-Linear Function :";
gotoxy(6,11);
cout<<"ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ";
gotoxy(6,37);
cout<<"Note : Write the function with proper Braces ( ) e.g; 2x+3 as (2*x)+3";
gotoxy(6,40);
cout<<"Available Operators : ^ (raised to power) , * , / , + , -";
gotoxy(6,42);
cout<<"Available Operands : x , e , sinx , cosx , tanx , lnx , logx ,";
gotoxy(6,44);
cout<<" n = any number";
gotoxy(6,14);
cout<<"Enter the Function : f(x) = ";
cin>>Fx;
convert_ie_to_pe(Fx);
}
clear_screen( );
gotoxy(6,9);
cout<<"Data Points & Values of Function :";
gotoxy(6,10);
cout<<"ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ";
gotoxy(25,12);
cout<<"ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿";
gotoxy(25,13);
cout<<"³ x ³ f(x) ³";
gotoxy(25,14);
cout<<"ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´";
gotoxy(25,15);
cout<<"³ ³ ³";
for(int count_1=0;count_1<=n;count_1++)
{
57. gotoxy(8,23);
cout<<"Estimated Integral Value = ";
cout<<estimated_value;
gotoxy(1,2);
}
5. Program untuk memperkirakan nilai derivatif pertama dari fungsi pada titik-titik
tertentu dari data yang diberikan menggunakan Tengah Perbedaan Formula di C ++
Programming
# include <iostream.h>
# include <stdlib.h>
# include <string.h>
# include <stdio.h>
# include <conio.h>
# include <math.h>
constint max_size=13;
int n=0;
int top=-1;
int choice=0;
longdouble h=0;
longdouble x0=0;
longdouble xn[max_size]={0};
longdouble fx[max_size]={0};
char Fx[100]={NULL};
char Dfx[100]={NULL};
char Stack[30][30]={NULL};
char Postfix_expression[2][30][30]={NULL};
void push(constchar *);
void convert_ie_to_pe(constchar *,constint);
constchar* pop( );
constlongdouble evaluate_postfix_expression(constlongdouble,constint);
void show_screen( );
void clear_screen( );
void get_input( );
void estimate_dfx( );
constint get_index(constlongdouble);
int main( )
{
clrscr( );
65. }
elseif(strcmp(Symbol_scanned,"=")!=0)
push(Symbol_scanned);
}
while(strcmp(Symbol_scanned,"=")!=0);
char Function_value[30]={NULL};
char *endptr;
strcpy(Function_value,pop( ));
function_value=strtod(Function_value,&endptr);
return function_value;
}
/*************************************************************************//
/----------------------------- get_input( ) --------------------------
///*************************************************************************
/void get_input( )
{
do
{
clear_screen( );
gotoxy(6,9);
cout<<"Number of Distinct Data Points :";
gotoxy(6,10);
cout<<"ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ";
gotoxy(27,13);
cout<<"[ min. n = 3 | max. n = 12 ]";
gotoxy(6,12);
cout<<"Enter the max. number of distinct data points = n = ";
cin>>n;
if(n<3 || n>12)
{
gotoxy(12,25);
cout<<"Error : Wrong Input. Press <Esc> to exit or any other key";
gotoxy(12,26);
cout<<" to try again.";
n=int(getche( ));
66. if(n==27)
exit(0);
}
}
while(n<3 || n>12);
gotoxy(6,16);
cout<<"Enter the value of x0 = ";
cin>>x0;
gotoxy(6,18);
cout<<"Enter the value of h = ";
cin>>h;
gotoxy(6,24);
cout<<"Input Mode :";
gotoxy(6,25);
cout<<"ÍÍÍÍÍÍÍÍÍÍÍÍ";
gotoxy(8,28);
cout<<"Press : ";
gotoxy(10,30);
cout<<"- 'Y' or <Enter> to enter function";
gotoxy(10,32);
cout<<"- 'N' or <Any other key> to enter values of the function";
gotoxy(8,35);
cout<<"Enter your choice : ";
char Choice=NULL;
Choice=getch( );
if(Choice=='y' || Choice=='Y' || int(Choice)==13)
{
choice=1;
gotoxy(28,35);
cout<<"Y";
}
else
{
gotoxy(28,35);
cout<<"N";
67. }
gotoxy(25,43);
cout<<"Press any key to continue...";
getch( );
if(choice)
{
clear_screen( );
gotoxy(6,11);
cout<<"Non-Linear Function :";
gotoxy(6,12);
cout<<"ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ";
gotoxy(6,37);
cout<<"Note : Write the function with proper Braces ( ) e.g; 2x+3 as (2*x)+3";
gotoxy(6,40);
cout<<"Available Operators : ^ (raised to power) , * , / , + , -";
gotoxy(6,42);
cout<<"Available Operands : x , e , sinx , cosx , tanx , lnx , logx ,";
gotoxy(6,44);
cout<<" n = any number";
gotoxy(6,14);
cout<<"Enter the Function : f(x) = ";
cin>>Fx;
gotoxy(6,17);
cout<<"Enter the Differential Function : f'(x) = ";
cin>>Dfx;
convert_ie_to_pe(Fx,0);
convert_ie_to_pe(Dfx,1);
}
clear_screen( );
gotoxy(6,9);
cout<<"Data Points & Values of Function :";
gotoxy(6,10);
cout<<"ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ";
69. if(choice)
gotoxy(25,(wherey( )+2));
else
gotoxy(25,(wherey( )+1));
}
gotoxy(25,43);
cout<<"Press any key to continue...";
getch( );
}
/*************************************************************************//
/------------------- get_index(const long double) --------------------
///*************************************************************************
/constint get_index(constlongdouble x)
{
for(int count=0;count<n;count++)
{
if(xn[count]==x)
break;
}
return count;
}
/*************************************************************************//
/---------------------------- estimate_dfx( ) ------------------------
///*************************************************************************
/void estimate_dfx( )
{
clear_screen( );
gotoxy(6,9);
cout<<"Centeral Difference Formula of Order 2 :";
gotoxy(6,10);
cout<<"ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ";
gotoxy(8,13);
cout<<"f'(x) ÷ [f(x+h)-f(x-h)]/2h";
gotoxy(6,17);
cout<<"Estimation of f'(x) :";
gotoxy(6,18);
70. cout<<"ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ";
char Choice=NULL;
longdouble x=0;
longdouble dfx=0;
longdouble actual_dfx=0;
int error_flag=0;
do
{
Choice=NULL;
x=0;
dfx=0;
actual_dfx=0;
error_flag=0;
gotoxy(10,20);
cout<<"Enter the value of x = ";
cin>>x;
if(x<=xn[0] || x>=xn[(n-1)])
{
error_flag=1;
gotoxy(10,23);
cout<<"Error: Please enter x greater than x(0) and less than x(n).";
}
else
{
int index=0;
index=get_index(x);
longdouble fxph=fx[(index+1)];
longdouble fxmh=fx[(index-1)];
dfx=((fxph-fxmh)/(2*h));
gotoxy(10,23);
cout<<"The estimated value of f'("<<x<<") ÷ "<<dfx;
}
if(choice && !error_flag)
{
actual_dfx=evaluate_postfix_expression(x,1);
71. gotoxy(10,25);
cout<<"The Actual value of f'("<<x<<") = "<<actual_dfx;
gotoxy(10,28);
cout<<"Absolute Error = E(abs) = "<<fabs((actual_dfx-dfx));
}
gotoxy(15,42);
cout<<"Press <Esc> to exit or any other key to continue...";
Choice=getch( );
if(int(Choice)!=27)
{
gotoxy(10,20);
cout<<" ";
gotoxy(10,23);
cout<<" ";
gotoxy(10,25);
cout<<" ";
gotoxy(10,28);
cout<<" ";
gotoxy(15,42);
cout<<" ";
}
elseif(int(Choice)==27)
exit(0);
}
while(1);
}
6. Program untuk membaca Sistem Linear dari Persamaan, kemudian mengevaluasi
dengan menggunakan Gauss-Seidel Metode Iteratif dan menampilkan hasil di C ++
Programming
# include <iostream.h>
# include <stdlib.h>
# include <stdio.h>
# include <conio.h>
# include <math.h>
constint max_size=5;
int n=0;
int iterations=0;
74. cout<<"[ Maximum size = 4 ]";
gotoxy(4,9);
cout<<"Enter the size of the System of Linear Equations = n = ";
cin>>n;
if(n<=0 || n>max_size)
{
gotoxy(12,25);
cout<<"Error : Wrong Input. Press <Esc> to exit or any other key";
gotoxy(12,26);
cout<<" to try again.";
n=int(getche( ));
if(n==27)
exit(0);
}
}
while(n<=0 || n>max_size);
gotoxy(4,15);
cout<<"Enter the number of iterations that you want to perform = ";
cin>>iterations;
gotoxy(4,18);
cout<<"Do you want to make the System Diagonally Dominant : (Y/N) ? : ";
cin>>Diagonally_dominant;
gotoxy(1,2);
}
/*************************************************************************//
/------------------ show_input(const int,const int) ------------------
///*************************************************************************
/void show_input(constint x,constint y)
{
int counter=0;
int number_of_inputs=((x*n)+y+x);
for(int count_1=0;count_1<n;count_1++)
{
gotoxy(4,(17+(count_1*2)));
cout<<" ";
83. cout<<"(k+1)";
else
cout<<"(k)";
gotoxy((wherex( )-1),(wherey( )+1));
if(input[count_1][(count_2+1)]>=0)
cout<<" + ";
else
cout<<" - ";
}
elseif(count_2!=count_1)
cout<<fabs(input[count_1][count_2]);
}
}
if(Diagonally_dominant=='Y' || Diagonally_dominant=='y')
{
gotoxy(4,26);
cout<<"Note: The given System of Linear Equations is solved by making it";
gotoxy(10,28);
cout<<"Diagonally Dominant.";
}
gotoxy(4,31);
cout<<"Result of Given System of Linear Equations :";
gotoxy(4,32);
cout<<"ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ";
for(int count_3=0;count_3<n;count_3++)
{
gotoxy(8,(34+count_3+count_3));
cout<<"x"<<(count_3+1)<<" = "<<output[count_3];
}
gotoxy(4,(36+count_3+count_3));
cout<<"* Number of Iterations for the above result = "<<iterations<<".";
gotoxy(1,2);
}
7. Program untuk membaca Sistem Linear dari Persamaan, kemudian mengevaluasi
dengan menggunakan Metode Itrative Jacobi dan menampilkan hasil di C ++
Programming
# include <iostream.h>
86. /*************************************************************************//
/------------------ get_size_of_linear_equations( ) ------------------
///*************************************************************************
/void get_size_of_linear_equations( )
{
do
{
clear_screen( );
gotoxy(38,11);
cout<<"[ Maximum size = 4 ]";
gotoxy(4,9);
cout<<"Enter the size of the System of Linear Equations = n = ";
cin>>n;
if(n<=0 || n>max_size)
{
gotoxy(12,25);
cout<<"Error : Wrong Input. Press <Esc> to exit or any other key";
gotoxy(12,26);
cout<<" to try again.";
n=int(getche( ));
if(n==27)
exit(0);
}
}
while(n<=0 || n>max_size);
gotoxy(4,15);
cout<<"Enter the number of iterations that you want to perform = ";
cin>>iterations;
gotoxy(4,18);
cout<<"Do you want to make the System Diagonally Dominant : (Y/N) ? : ";
cin>>Diagonally_dominant;
gotoxy(1,2);
}
/*************************************************************************//
/----------------- show_input(const int,const int) -------------------