Algorithms and Programs презентация

Слайд 2

Algorithm An algorithm is a procedure used for solving a

Algorithm

An algorithm is a procedure used for solving a problem or

performing a computation. Algorithms act as an exact list of instructions that conduct specified actions step by step in either hardware- or software-based routines.
Слайд 3

Cin – c input Cout – c output

Cin – c input
Cout – c output

Слайд 4

#include using namespace std; int main() { float a,b,c; a

#include
using namespace std;
int main() {
float a,b,c;
a

= 10;
b= 20;
c = a *b;
cout< return 0;}
Слайд 5

#include using namespace std; int main() { float a,b,c; cout cin>>a>>b; c=a-b; cout return 0; }

#include
using namespace std;
int main() {
float a,b,c;
cout<< “enter

the value for a and b”;
cin>>a>>b;
c=a-b;
cout< return 0;
}
Слайд 6

#include using namespace std; int main() { int a,b; a=10;

#include
using namespace std;
int main() {
int a,b;
a=10; b= 13;
if(a{

cout<<“a is less than b”;}
if (a>b)
{ cout<<“a is greater than b”; } if (a<=b)
{ cout << “a is less than or equal to b” ; }
if (a>=b)
{ cout<< “a is greater than or equal to b”; }
if (a==b)
{ cout<<“a is equal to b”; }
if (a!=b)
{ cout << “a is not equal to b”;}
}
Имя файла: Algorithms-and-Programs.pptx
Количество просмотров: 21
Количество скачиваний: 0