SlideShare uma empresa Scribd logo
1 de 6
Baixar para ler offline
PROGRAMACION G++


1)
# include<iostream>
# include <stdio.h>
using namespace std;

int main ()
{
        Clrscr();
        for(int =1;i<=20;++)
        {
        cout<<i;
        if(i%3==0)cout<<”hola1”<<endl;
        else cout<<”hola2”<<endl;
}
Getch();
Return 0;
}




2)
# include <iostream>
# include <stdio.h>
using namespace std;

int main ()
{
         Int A,B,C;
         A=20;B=30;C=60;
         printf("n%d+ %d - %d + 100 =%d “,A,B,C (A+B+C-100));
getch();
}
3)

# include <iostream>
# include <stdio.h>
using namespace std;

int main ()
{
         Inta,b;
         a=6;b=3;
         printf("(%d - %d) (%d + %d) = %d “,a,b, ((a - b) * (a + b)) );
getch();
}




4)
5)




7)
8)




9)




10)
15)




18)




19)
20)

# include <iostream>
# include <stdio.h>
using namespace std;

int main ()
{

        int vect1[10];
        intx,y,aux;
        aux=0;
        for (x=0;x<=10-1;x++)
        {
                for(y=x+1;y<10-1;y++)
                {
                        if (vect1[x]<=vect1[y])
                        {
                                 aux=vect1[x];
                                 vect1[x]=vect1[y];
                                 vect1[y]=aux;
                        }
                }
        }
}


        21)

Mais conteúdo relacionado

Mais procurados

Programa expresiones regulares
Programa expresiones regularesPrograma expresiones regulares
Programa expresiones regularesAnel Sosa
 
Patrick Kettner - JavaScript without javascript
Patrick Kettner - JavaScript without javascriptPatrick Kettner - JavaScript without javascript
Patrick Kettner - JavaScript without javascriptOdessaJS Conf
 
Computer Graphics Lab File C Programs
Computer Graphics Lab File C ProgramsComputer Graphics Lab File C Programs
Computer Graphics Lab File C ProgramsKandarp Tiwari
 
Interpolation graph c++
Interpolation graph c++Interpolation graph c++
Interpolation graph c++rpiitcbme
 
Javascript Without Javascript
Javascript Without JavascriptJavascript Without Javascript
Javascript Without JavascriptPatrick Kettner
 
Dfs implementation in c
Dfs implementation in cDfs implementation in c
Dfs implementation in cHapPy SumOn
 
10CSL67 CG LAB PROGRAM 10
10CSL67 CG LAB PROGRAM 1010CSL67 CG LAB PROGRAM 10
10CSL67 CG LAB PROGRAM 10Vanishree Arun
 
VTU Network lab programs
VTU Network lab   programsVTU Network lab   programs
VTU Network lab programsAnanda Kumar HN
 
Solutionsfor co2 C Programs for data structures
Solutionsfor co2 C Programs for data structuresSolutionsfor co2 C Programs for data structures
Solutionsfor co2 C Programs for data structuresLakshmi Sarvani Videla
 
ECMAScript 6 major changes
ECMAScript 6 major changesECMAScript 6 major changes
ECMAScript 6 major changeshayato
 
Cg my own programs
Cg my own programsCg my own programs
Cg my own programsAmit Kapoor
 
10CSL67 CG LAB PROGRAM 8
10CSL67 CG LAB PROGRAM 810CSL67 CG LAB PROGRAM 8
10CSL67 CG LAB PROGRAM 8Vanishree Arun
 
Matlab Area Calculation program
Matlab Area Calculation programMatlab Area Calculation program
Matlab Area Calculation programTevfik AKKUŞ
 
Lcs & fractional knapsack
Lcs & fractional knapsackLcs & fractional knapsack
Lcs & fractional knapsackSajid Hasan
 

Mais procurados (20)

Coding
CodingCoding
Coding
 
Programa expresiones regulares
Programa expresiones regularesPrograma expresiones regulares
Programa expresiones regulares
 
Patrick Kettner - JavaScript without javascript
Patrick Kettner - JavaScript without javascriptPatrick Kettner - JavaScript without javascript
Patrick Kettner - JavaScript without javascript
 
Computer Graphics Lab File C Programs
Computer Graphics Lab File C ProgramsComputer Graphics Lab File C Programs
Computer Graphics Lab File C Programs
 
Proga 0601
Proga 0601Proga 0601
Proga 0601
 
Interpolation graph c++
Interpolation graph c++Interpolation graph c++
Interpolation graph c++
 
Javascript Without Javascript
Javascript Without JavascriptJavascript Without Javascript
Javascript Without Javascript
 
Oopsprc1c
Oopsprc1cOopsprc1c
Oopsprc1c
 
Dfs implementation in c
Dfs implementation in cDfs implementation in c
Dfs implementation in c
 
10CSL67 CG LAB PROGRAM 10
10CSL67 CG LAB PROGRAM 1010CSL67 CG LAB PROGRAM 10
10CSL67 CG LAB PROGRAM 10
 
VTU Network lab programs
VTU Network lab   programsVTU Network lab   programs
VTU Network lab programs
 
Solutionsfor co2 C Programs for data structures
Solutionsfor co2 C Programs for data structuresSolutionsfor co2 C Programs for data structures
Solutionsfor co2 C Programs for data structures
 
C programs
C programsC programs
C programs
 
Clock For My
Clock For MyClock For My
Clock For My
 
ECMAScript 6 major changes
ECMAScript 6 major changesECMAScript 6 major changes
ECMAScript 6 major changes
 
Cg my own programs
Cg my own programsCg my own programs
Cg my own programs
 
Vcs22
Vcs22Vcs22
Vcs22
 
10CSL67 CG LAB PROGRAM 8
10CSL67 CG LAB PROGRAM 810CSL67 CG LAB PROGRAM 8
10CSL67 CG LAB PROGRAM 8
 
Matlab Area Calculation program
Matlab Area Calculation programMatlab Area Calculation program
Matlab Area Calculation program
 
Lcs & fractional knapsack
Lcs & fractional knapsackLcs & fractional knapsack
Lcs & fractional knapsack
 

Destaque

Presentation sec3
Presentation sec3Presentation sec3
Presentation sec3sitebato
 
E markting-email marketing
E markting-email marketingE markting-email marketing
E markting-email marketinghruskys
 
過得像個人,才能看到美
過得像個人,才能看到美過得像個人,才能看到美
過得像個人,才能看到美Light Lin
 
Master 2013 march
Master 2013 marchMaster 2013 march
Master 2013 marchB2Barter
 
Pres grande progetto Centro Storico Unesco
Pres grande progetto Centro Storico UnescoPres grande progetto Centro Storico Unesco
Pres grande progetto Centro Storico UnescoDanislide
 
биогориво против
биогориво противбиогориво против
биогориво противMarija Malesh
 
El paisatge de costa
El paisatge de costaEl paisatge de costa
El paisatge de costapromo0607
 
Quero vender on line mais tenho pouca grana. como divulgar e começar o meu ne...
Quero vender on line mais tenho pouca grana. como divulgar e começar o meu ne...Quero vender on line mais tenho pouca grana. como divulgar e começar o meu ne...
Quero vender on line mais tenho pouca grana. como divulgar e começar o meu ne...Patrícia Carbri
 
Tokoh tokoh fiqh indonesia
Tokoh tokoh fiqh indonesiaTokoh tokoh fiqh indonesia
Tokoh tokoh fiqh indonesiatopmusbis
 
Pengenalan Framework .NET
Pengenalan Framework .NETPengenalan Framework .NET
Pengenalan Framework .NETHelmy Satria
 

Destaque (20)

Brownell
BrownellBrownell
Brownell
 
E gov bab 16-p.ali.docx
E gov bab 16-p.ali.docxE gov bab 16-p.ali.docx
E gov bab 16-p.ali.docx
 
Familia vinci 46
Familia vinci 46Familia vinci 46
Familia vinci 46
 
Vikas
VikasVikas
Vikas
 
The Truth About God (10 Mac 2013)
The Truth About God (10 Mac 2013)The Truth About God (10 Mac 2013)
The Truth About God (10 Mac 2013)
 
Presentation sec3
Presentation sec3Presentation sec3
Presentation sec3
 
Purim 5773 pervomaisk ukraine
Purim 5773 pervomaisk ukrainePurim 5773 pervomaisk ukraine
Purim 5773 pervomaisk ukraine
 
E markting-email marketing
E markting-email marketingE markting-email marketing
E markting-email marketing
 
過得像個人,才能看到美
過得像個人,才能看到美過得像個人,才能看到美
過得像個人,才能看到美
 
Master 2013 march
Master 2013 marchMaster 2013 march
Master 2013 march
 
Pres grande progetto Centro Storico Unesco
Pres grande progetto Centro Storico UnescoPres grande progetto Centro Storico Unesco
Pres grande progetto Centro Storico Unesco
 
Filosofia
FilosofiaFilosofia
Filosofia
 
Zoom
ZoomZoom
Zoom
 
биогориво против
биогориво противбиогориво против
биогориво против
 
ALex
ALexALex
ALex
 
El paisatge de costa
El paisatge de costaEl paisatge de costa
El paisatge de costa
 
Quero vender on line mais tenho pouca grana. como divulgar e começar o meu ne...
Quero vender on line mais tenho pouca grana. como divulgar e começar o meu ne...Quero vender on line mais tenho pouca grana. como divulgar e começar o meu ne...
Quero vender on line mais tenho pouca grana. como divulgar e começar o meu ne...
 
Tokoh tokoh fiqh indonesia
Tokoh tokoh fiqh indonesiaTokoh tokoh fiqh indonesia
Tokoh tokoh fiqh indonesia
 
Fabric Patterns
Fabric PatternsFabric Patterns
Fabric Patterns
 
Pengenalan Framework .NET
Pengenalan Framework .NETPengenalan Framework .NET
Pengenalan Framework .NET
 

Semelhante a Caropro

Ejercicios de programacion
Ejercicios de programacionEjercicios de programacion
Ejercicios de programacionJeff Tu Pechito
 
Hitchhiker's Guide to Functional Programming
Hitchhiker's Guide to Functional ProgrammingHitchhiker's Guide to Functional Programming
Hitchhiker's Guide to Functional ProgrammingSergey Shishkin
 
Microsoft Word Hw#1
Microsoft Word   Hw#1Microsoft Word   Hw#1
Microsoft Word Hw#1kkkseld
 
Go vs C++ - CppRussia 2019 Piter BoF
Go vs C++ - CppRussia 2019 Piter BoFGo vs C++ - CppRussia 2019 Piter BoF
Go vs C++ - CppRussia 2019 Piter BoFTimur Safin
 
Os lab file c programs
Os lab file c programsOs lab file c programs
Os lab file c programsKandarp Tiwari
 
The Ring programming language version 1.10 book - Part 33 of 212
The Ring programming language version 1.10 book - Part 33 of 212The Ring programming language version 1.10 book - Part 33 of 212
The Ring programming language version 1.10 book - Part 33 of 212Mahmoud Samir Fayed
 
Create a java project that - Draw a circle with three random init.pdf
Create a java project that - Draw a circle with three random init.pdfCreate a java project that - Draw a circle with three random init.pdf
Create a java project that - Draw a circle with three random init.pdfarihantmobileselepun
 
C Prog - Pointers
C Prog - PointersC Prog - Pointers
C Prog - Pointersvinay arora
 
Computer graphics lab manual
Computer graphics lab manualComputer graphics lab manual
Computer graphics lab manualUma mohan
 
Computer graphics lab assignment
Computer graphics lab assignmentComputer graphics lab assignment
Computer graphics lab assignmentAbdullah Al Shiam
 
The Ring programming language version 1.3 book - Part 50 of 88
The Ring programming language version 1.3 book - Part 50 of 88The Ring programming language version 1.3 book - Part 50 of 88
The Ring programming language version 1.3 book - Part 50 of 88Mahmoud Samir Fayed
 
C++ Programming - 1st Study
C++ Programming - 1st StudyC++ Programming - 1st Study
C++ Programming - 1st StudyChris Ohk
 

Semelhante a Caropro (20)

Ejercicios de programacion
Ejercicios de programacionEjercicios de programacion
Ejercicios de programacion
 
C++ TUTORIAL 10
C++ TUTORIAL 10C++ TUTORIAL 10
C++ TUTORIAL 10
 
C++ TUTORIAL 9
C++ TUTORIAL 9C++ TUTORIAL 9
C++ TUTORIAL 9
 
Vcs9
Vcs9Vcs9
Vcs9
 
Blocks+gcd入門
Blocks+gcd入門Blocks+gcd入門
Blocks+gcd入門
 
Hitchhiker's Guide to Functional Programming
Hitchhiker's Guide to Functional ProgrammingHitchhiker's Guide to Functional Programming
Hitchhiker's Guide to Functional Programming
 
Microsoft Word Hw#1
Microsoft Word   Hw#1Microsoft Word   Hw#1
Microsoft Word Hw#1
 
Go vs C++ - CppRussia 2019 Piter BoF
Go vs C++ - CppRussia 2019 Piter BoFGo vs C++ - CppRussia 2019 Piter BoF
Go vs C++ - CppRussia 2019 Piter BoF
 
Os lab file c programs
Os lab file c programsOs lab file c programs
Os lab file c programs
 
The Ring programming language version 1.10 book - Part 33 of 212
The Ring programming language version 1.10 book - Part 33 of 212The Ring programming language version 1.10 book - Part 33 of 212
The Ring programming language version 1.10 book - Part 33 of 212
 
C programs
C programsC programs
C programs
 
Prelude to halide_public
Prelude to halide_publicPrelude to halide_public
Prelude to halide_public
 
C programs
C programsC programs
C programs
 
ADA FILE
ADA FILEADA FILE
ADA FILE
 
Create a java project that - Draw a circle with three random init.pdf
Create a java project that - Draw a circle with three random init.pdfCreate a java project that - Draw a circle with three random init.pdf
Create a java project that - Draw a circle with three random init.pdf
 
C Prog - Pointers
C Prog - PointersC Prog - Pointers
C Prog - Pointers
 
Computer graphics lab manual
Computer graphics lab manualComputer graphics lab manual
Computer graphics lab manual
 
Computer graphics lab assignment
Computer graphics lab assignmentComputer graphics lab assignment
Computer graphics lab assignment
 
The Ring programming language version 1.3 book - Part 50 of 88
The Ring programming language version 1.3 book - Part 50 of 88The Ring programming language version 1.3 book - Part 50 of 88
The Ring programming language version 1.3 book - Part 50 of 88
 
C++ Programming - 1st Study
C++ Programming - 1st StudyC++ Programming - 1st Study
C++ Programming - 1st Study
 

Mais de daquicaro

Mais de daquicaro (20)

10 pilli
10 pilli10 pilli
10 pilli
 
999 pilli
999 pilli999 pilli
999 pilli
 
9 pilli
9 pilli9 pilli
9 pilli
 
8pilli
8pilli8pilli
8pilli
 
7dpilli
7dpilli7dpilli
7dpilli
 
Deb
DebDeb
Deb
 
Practica y evaluacion
Practica y evaluacionPractica y evaluacion
Practica y evaluacion
 
Dando formato a los párrafos
Dando formato a los párrafosDando formato a los párrafos
Dando formato a los párrafos
 
Correcion de la preueba de pro..
Correcion de la preueba de pro..Correcion de la preueba de pro..
Correcion de la preueba de pro..
 
Cr
CrCr
Cr
 
Cristina
CristinaCristina
Cristina
 
Informe
InformeInforme
Informe
 
Informe
InformeInforme
Informe
 
Informe
InformeInforme
Informe
 
Compu
CompuCompu
Compu
 
Compu
CompuCompu
Compu
 
Puebe de programacion
Puebe de programacionPuebe de programacion
Puebe de programacion
 
Puebe de programacion
Puebe de programacionPuebe de programacion
Puebe de programacion
 
Presentación1
Presentación1Presentación1
Presentación1
 
Desiciones
DesicionesDesiciones
Desiciones
 

Caropro

  • 1. PROGRAMACION G++ 1) # include<iostream> # include <stdio.h> using namespace std; int main () { Clrscr(); for(int =1;i<=20;++) { cout<<i; if(i%3==0)cout<<”hola1”<<endl; else cout<<”hola2”<<endl; } Getch(); Return 0; } 2) # include <iostream> # include <stdio.h> using namespace std; int main () { Int A,B,C; A=20;B=30;C=60; printf("n%d+ %d - %d + 100 =%d “,A,B,C (A+B+C-100)); getch(); }
  • 2. 3) # include <iostream> # include <stdio.h> using namespace std; int main () { Inta,b; a=6;b=3; printf("(%d - %d) (%d + %d) = %d “,a,b, ((a - b) * (a + b)) ); getch(); } 4)
  • 6. 20) # include <iostream> # include <stdio.h> using namespace std; int main () { int vect1[10]; intx,y,aux; aux=0; for (x=0;x<=10-1;x++) { for(y=x+1;y<10-1;y++) { if (vect1[x]<=vect1[y]) { aux=vect1[x]; vect1[x]=vect1[y]; vect1[y]=aux; } } } } 21)