• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 8 pages
Summary

Sumario Resumen código c++

Document preview thumbnail
Preview 2 out of 8 pages

Resumen de código c++ explicando la sintaxis

Content preview

C++


Tipos de Variables
espacio en
nombre descripción Ejemplos
memoria

Integer (Int) Numeros enteros (sin decimales) 4 bytes 35, -35, 108, -95

1.5329, -45.95,
Double float, numero entero con decimales 8 bytes
108.5

Char string de un solo caracter 1 byte A, b, Q, L, g

String texto - “Hello World”

Guarda un valor que puede estar en
Bool 1 byte True, False
dos estados



Operadores Básicos
Operación Operador Código en “C”

Suma + a+b

Incremento en 1 a+1 a++

Resta - a-b

Decremento en 1 a-1 a- -

Multiplicación x a*b

División / a/b

Residuo res a%b

Potencia a^b pow(a,b)

Igual a a=b a == b

Moyor o igual a a≥b a>=b

Diferente ≠ a != b

AND and a && b

OR or a // b




C++ 1

, Estructuras de Control

While / For
Usos:

Para iterar un set de instrucciones un numero de veces

Para iterar un set de instrucciones hasta que no se cumpla la condición



Sintaxis
1


while ( condición ); {
Instrucción 1;
Instrucción 2;
...
}




2


do
{
Instrucción 1;
Instrucción 2;
...
}while( condiciópn);




3


for (int i=inicio; i<=final; i++){
Instrucción 1;
Instrucción 2;
...
}




C++ 2

Document information

Uploaded on
December 2, 2022
Number of pages
8
Written in
2022/2023
Type
Summary
$7.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Sold
0
Followers
0
Items
5
Last sold
-



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions