Flussdiagramm
Dev C++ Prog...
Inhalt des Flussdiagramms
Dev C++ Programming
Libraries
Variables
Syntax
Functions
Operations
This is an important part of the programm because it does some actions, with predefined word contained at the libraries that you call as you need in your program.
Examples of libraries, uses and syntax to call them
iostream: STL part, contains standars
alghorithms, maybe the most used
string: STLpart, relative to the containers, to save alphanumeric data, is easier, helps with problems at char.
math.h: Contains prototypes of math functions and definitions to use them at the program
conio.h: in/out libraries, help compilers
to include at the program is necesary the syntax
#include "iostream"
#include "string"
#include <math.h>
#include <conio.h>
To save values to each data that our language could read.
All the variables are represented and used about one name that is given by the programmer or it’s predefined.
It’s advisable just use a letter, not special character and don’t have space
This is the correct form to write the programm in this language, and is different for teh activity you are doing.
Some functions we have seen:
IF
This function consider a decision in the program, must of the times answered with short answers (yes or not) and take a different way to continue, depending on the condition.
IF ELSE in case of the condition is false this will have a process to continue.
ELSE IF to prove if the first condition is false and a process to continue.
SWITCH CASE
This function help us to decide between many different options, with some similarity with the function if, but in this case is easier selecting just one option, than comparing true or false questions.
BREAK: This verify that when the option selected has a case, stop the searching and continue with the indicated process at the case, then to stop the process at the end of one of the cases,
DEFAULT: If some answered doesn’t have any coincidence this would be the way of the program to continue.
FOR
This function helps us to repeat some activities finite times, starting at the indicated constant or variable and finishing with the finite limit. You can determine the increase. Is most used with numbers.
WHILE
This function helps us to repeat some activities too, the difference with FOR is that in this case could be any condition and while this is real or true case the program will repeat this loop.
We have next resources to do this operations
Mathematical operators
Operation Symbol Sintax
Addition + var1 + var2
Substraction - var1 – var2
Multiplication * var1 * var2
Division / var1 / var2
Module % var1%var2
Relational operators
Operation Symbol Sintax
Greater-than > var1 > var2
Less than < var1 < var2
Greater-than or equal to >= var1 >= var2
Less tan or equal to <= var1 <= var2
Equal to = var1 = var2
Not equal to ! = var1 ! = var2
Is important to define how do you want to order your operation to have the correct result, at substract and divide.
Specially at dividing we can´t divide with 0, so define this condition.
At dividing we can know the module using the same order that at division.
There are different types of variables.
float = Numerical with decimals
int = Numerical without decimals
char = Variable with just 1 character
bool = Variable Boolean type
Examples of syntax in Dev C++
#include "iostream"
To declarate one library
using namespace std;
int main(){
To declarate programming space
int Op;
float x,y;
To declarate variables of int and float types
cout <<"TEXT"<<endl;
To show text at screen
cin>>v1;
To ask to introduce a value to the variable.
Start: To declarate a start to the programm
system("cls"); To clear screen info
system("pause"); To pause the program
goto Start; To go to the start declarated
// To add comentaries
This are action that a program has predefined, this codes or words must not be used in a different way that isn´t the function it has.
Helps us to solve or improve different ways to solve a problem.
Generally you need to know how they work to use them as you need.
This are basic math operations that we use in our learning programs.
Informationen
- Beschreibung
- Flussdiagramm am Dev C++ Prog..., erstellt von VICTOR SEBASTIAN SANTANA MU�OZ am 16/06/2021.
- Erstellt von
- VICTOR SEBASTIAN SANTANA MU�OZ
- Aufrufe
- 2
- Bewertung