SlideShare a Scribd company logo
1 of 8
CODIGO VISUAL BASIC
Sub copia_y_pega()
Dim texto As String
Dim contador As Integer
Dim contador2 As Integer
Dim contador3 As Integer
Open "C:UsersFreddyDocumentsprueba.txt" For Input As #1
texto = Input(LOF(1), #1)
MsgBox ("PROGRAMA PARA CONTAR MAYUSCULAS,MINUSCULAS,VOCALES DESDE UN ARCHIVO DE TEXTO")
For i = 1 To Len(texto)
If Mid(texto, i, 1) = "b" Or Mid(texto, i, 1) = "c" Or Mid(texto, i, 1) = "d" Or Mid(texto, i, 1) = "f" Or Mid(texto, i, 1) = "g" Or Mid(texto, i, 1) = "h" Or
Mid(texto, i, 1) = "j" Or Mid(texto, i, 1) = "k" Or Mid(texto, i, 1) = "l" Or Mid(texto, i, 1) = "m" Or Mid(texto, i, 1) = "n" Or Mid(texto, i, 1) = "ñ" Or
Mid(texto, i, 1) = "p" Or Mid(texto, i, 1) = "q" Or Mid(texto, i, 1) = "r" Or Mid(texto, i, 1) = "s" Or Mid(texto, i, 1) = "t" Or Mid(texto, i, 1) = "v" Or
Mid(texto, i, 1) = "w" Or Mid(texto, i, 1) = "x" Or Mid(texto, i, 1) = "y" Or Mid(texto, i, 1) = "z" Then
contador = contador + 1
End If
If Mid(texto, i, 1) = "a" Or Mid(texto, i, 1) = "e" Or Mid(texto, i, 1) = "i" Or Mid(texto, i, 1) = "o" Or Mid(texto, i, 1) = "u" Then
contador2 = contador2 + 1
End If
If Mid(texto, i, 1) = "A" Or Mid(texto, i, 1) = "B" Or Mid(texto, i, 1) = "C" Or Mid(texto, i, 1) = "D" Or Mid(texto, i, 1) = "E" Or Mid(texto, i, 1) =
"F" Or Mid(texto, i, 1) = "G" Or Mid(texto, i, 1) = "H" Or Mid(texto, i, 1) = "I" Or Mid(texto, i, 1) = "J" Or Mid(texto, i, 1) = "K" Or Mid(texto, i, 1) =
"L" Or Mid(texto, i, 1) = "M" Or Mid(texto, i, 1) = "N" Or Mid(texto, i, 1) = "Ñ" Or Mid(texto, i, 1) = "O" Or Mid(texto, i, 1) = "P" Or Mid(texto, i, 1) =
"Q" Or Mid(texto, i, 1) = "R" Or Mid(texto, i, 1) = "S" Or Mid(texto, i, 1) = "T" Or Mid(texto, i, 1) = "U" Or Mid(texto, i, 1) = "V" Or Mid(texto, i, 1) =
"W" Or Mid(texto, i, 1) = "X" Or Mid(texto, i, 1) = "Y" Or Mid(texto, i, 1) = "Z" Then
contador3 = contador3 + 1
End If
Next i
MsgBox ("El numero de mayusculas es: " & contador3)
MsgBox ("El numero de consonantes es: " & contador)
MsgBox ("El numero de vocales es: " & contador2)
Close #1
End Sub
LENGUAJE C
#include "stdio.h"
#include "stdafx.h"
#include "string.h"
#include "stdlib.h"
# include "fstream"
int main(int argc, char **argv)
{
FILE *pfsArchivo;
char ch, txt[300] = "";
int j = 0;
int a = 0, e = 0, i = 0, o = 0, u = 0, acumulador = 0, suma = 0, acumulador2 = 0;
int nas = 0, nes = 0, nis = 0, nos = 0, nus = 0, nbs = 0, ncs = 0, nds = 0, nfs = 0, ngs = 0, nhs = 0, nps = 0, nqs = 0, nrs = 0, nss = 0, nts
= 0, nvs = 0, njs = 0, nks = 0, nls = 0, nms = 0, nns = 0, nñs = 0, nws = 0, nxs = 0, nys = 0, nzs = 0;
printf("t PROGRAMA PARA ENCONTRAR MAYUSCULAS, VOCALES Y CONSONANTESn");
printf("ttt DESDE UN ARCHIVO DE TEXTOn");
printf("nCONTENIDO DE SU DOCUMENTO:n");
pfsArchivo = fopen("C:UsersFreddyDocumentsprueba.txt", "r");
if (pfsArchivo == NULL)
{
printf("No se pudo abrir el archivo %s n", "prueba.txt");
}
else
{
while ((txt[j] = getc(pfsArchivo)) != EOF)
{
ch = txt[j];
switch (ch)
{
case 'a':
nas++;
txt[j] = 'a';
break;
case 'e':
nes++;
txt[j] = 'e';
break;
case 'i':
nis++;
txt[j] = 'i';
break;
case 'o':
nos++;
txt[j] = 'o';
break;
case 'u':
nus++;
txt[j] = 'u';
break;
case 'b':
nbs++;
txt[j] = 'b';
break;
case 'c':
ncs++;
txt[j] = 'c';
break;
case 'd':
nds++;
txt[j] = 'd';
break;
case 'f':
nfs++;
txt[j] = 'f';
break;
case 'g':
ngs++;
txt[j] = 'g';
break;
case 'h':
nhs++;
txt[j] = 'h';
break;
case 'j':
njs++;
txt[j] = 'j';
break;
case 'k':
nks++;
txt[j] = 'k';
break;
case 'l':
nls++;
txt[j] = 'l';
break;
case 'm':
nms++;
txt[j] = 'm';
break;
case 'n':
nns++;
txt[j] = 'n';
break;
case 'ñ':
nñs++;
txt[j] = 'ñ';
break;
case 'p':
nps++;
txt[j] = 'p';
break;
case 'q':
nqs++;
txt[j] = 'q';
break;
case 'r':
nrs++;
txt[j] = 'r';
break;
case 's':
nss++;
txt[j] = 's';
break;
case 't':
nts++;
txt[j] = 't';
break;
case 'v':
nvs++;
txt[j] = 'v';
break;
case 'w':
nws++;
txt[j] = 'w';
break;
case 'x':
nxs++;
txt[j] = 'x';
break;
case 'y':
nys++;
txt[j] = 'y';
break;
case 'z':
nzs++;
txt[j] = 'z';
break;
}
j++;
}
for (j = 0; j < 100; j++)
{
if (txt[j] >= 65 && txt[j] <= 90)
{
suma++;
}
}
printf("n%sn", &txt);
}
acumulador2 = acumulador2 + nbs + ncs + nds + nfs + ngs + nhs + nps + nqs + nrs + nss + nts + nvs + njs + nks + nls + nms + nns +
nñs + nws + nxs + nys + nzs;
acumulador = acumulador + nas + nes + nis + nos + nus;
printf("nOBSERVACIONES :n");
printf("nEl numero de mayusculas es: %d", suma);
printf("nEl numero de vocales es: %d", acumulador);
printf("nEl numero de consonantes es: %d", acumulador2);
fclose(pfsArchivo);
getchar();
return 0;
}
CODIGO JAVA
package javaapplication4;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.Scanner;
public class JavaApplication4
{
public static void main(String[] args)
{
Scanner dato = new Scanner(System.in);
int Contador1= 0;
int Contador2 = 0;
int Contador = 0;
System.out.println("t PROGRAMA PARA ENCONTRAR MAYUSCULAS, VOCALES Y CONSONANTESn");
System.out.println("ttt DESDE UN ARCHIVO DE TEXTOn");
System.out.println("nCONTENIDO DE SU DOCUMENTO:");
try {
FileReader fr = new FileReader("C:UsersFreddyDocumentsprueba.txt");
BufferedReader bf = new BufferedReader(fr);
String sCadena;
sCadena="prueba.txt";
while ((sCadena = bf.readLine())!=null)
{
System.out.println(sCadena);
for(int i=0; i<sCadena.length(); i++)
{
if(sCadena.charAt(i) == 'a' || sCadena.charAt(i) == 'e' || sCadena.charAt(i) == 'i' || sCadena.charAt(i) == 'o' ||
sCadena.charAt(i) == 'u')
Contador1++;
else
if(sCadena.charAt(i) == 'b' || sCadena.charAt(i) == 'c' || sCadena.charAt(i) == 'd' || sCadena.charAt(i) == 'f' ||
sCadena.charAt(i) == 'g'||sCadena.charAt(i) == 'h' || sCadena.charAt(i) == 'j' || sCadena.charAt(i) == 'k' || sCadena.charAt(i) == 'l' ||
sCadena.charAt(i) == 'm'||sCadena.charAt(i) == 'n' || sCadena.charAt(i) == 'ñ' || sCadena.charAt(i) == 'p' || sCadena.charAt(i) == 'q' ||
sCadena.charAt(i) == 'r'||sCadena.charAt(i) == 's' || sCadena.charAt(i) == 't' || sCadena.charAt(i) == 'v' || sCadena.charAt(i) == 'w' ||
sCadena.charAt(i) == 'x'|| sCadena.charAt(i) == 'y'|| sCadena.charAt(i) == 'z')
Contador2++;
else
if(sCadena.charAt(i) == 'A' || sCadena.charAt(i) == 'E' || sCadena.charAt(i) == 'I' || sCadena.charAt(i) == 'O' ||
sCadena.charAt(i) == 'U')
Contador++;
else
if (sCadena.charAt(i) == 'B' || sCadena.charAt(i) == 'C' || sCadena.charAt(i) == 'D' || sCadena.charAt(i) == 'E' ||
sCadena.charAt(i) == 'F'||sCadena.charAt(i) == 'J' || sCadena.charAt(i) == 'H' || sCadena.charAt(i) == 'K' || sCadena.charAt(i) == 'L' ||
sCadena.charAt(i) == 'M'||sCadena.charAt(i) == 'N' || sCadena.charAt(i) == 'Ñ' || sCadena.charAt(i) == 'O' || sCadena.charAt(i) == 'P' ||
sCadena.charAt(i) == 'Q'||sCadena.charAt(i) == 'R' || sCadena.charAt(i) == 'S' || sCadena.charAt(i) == 'T' || sCadena.charAt(i) == 'V' ||
sCadena.charAt(i) == 'W'||sCadena.charAt(i) == 'X'||sCadena.charAt(i) == 'Y'|| sCadena.charAt(i) == 'Z') {
Contador++;
}
}
}
System.out.println("nOBSERVACIONES:");
System.out.print("nEl numero de vocales es: "+Contador1);
System.out.print("nEl numero de consonantes es: "+Contador2);
System.out.print("nEl numero de mayusculas es: "+Contador);
}
catch (FileNotFoundException fnfe)
{
} catch (IOException ioe)
{
}
}
}

More Related Content

What's hot

ZeroMQ Is The Answer: DPC 11 Version
ZeroMQ Is The Answer: DPC 11 VersionZeroMQ Is The Answer: DPC 11 Version
ZeroMQ Is The Answer: DPC 11 VersionIan Barber
 
ZeroMQ: Messaging Made Simple
ZeroMQ: Messaging Made SimpleZeroMQ: Messaging Made Simple
ZeroMQ: Messaging Made SimpleIan Barber
 
Railson dickinson 5 mil seguidores
Railson dickinson 5 mil seguidoresRailson dickinson 5 mil seguidores
Railson dickinson 5 mil seguidoresRailson Dickinson
 
Dropping ACID with MongoDB
Dropping ACID with MongoDBDropping ACID with MongoDB
Dropping ACID with MongoDBkchodorow
 
How to stand on the shoulders of giants
How to stand on the shoulders of giantsHow to stand on the shoulders of giants
How to stand on the shoulders of giantsIan Barber
 
Grails - The search is over
Grails - The search is overGrails - The search is over
Grails - The search is overFelipe Coutinho
 
How to write rust instead of c and get away with it
How to write rust instead of c and get away with itHow to write rust instead of c and get away with it
How to write rust instead of c and get away with itFlavien Raynaud
 
よく使うテストヘルパーの紹介 #ios_test_night
よく使うテストヘルパーの紹介 #ios_test_nightよく使うテストヘルパーの紹介 #ios_test_night
よく使うテストヘルパーの紹介 #ios_test_nightKenji Tanaka
 
File handling complete programs in c++
File handling complete programs in c++File handling complete programs in c++
File handling complete programs in c++zain ul hassan
 
Solr & Lucene @ Etsy by Gregg Donovan
Solr & Lucene @ Etsy by Gregg DonovanSolr & Lucene @ Etsy by Gregg Donovan
Solr & Lucene @ Etsy by Gregg DonovanGregg Donovan
 
When RegEx is not enough
When RegEx is not enoughWhen RegEx is not enough
When RegEx is not enoughNati Cohen
 
QA Fest 2019. Saar Rachamim. Developing Tools, While Testing
QA Fest 2019. Saar Rachamim. Developing Tools, While TestingQA Fest 2019. Saar Rachamim. Developing Tools, While Testing
QA Fest 2019. Saar Rachamim. Developing Tools, While TestingQAFest
 
C++ adt c++ implementations
C++   adt c++ implementationsC++   adt c++ implementations
C++ adt c++ implementationsRex Mwamba
 
Webinar: Exploring the Aggregation Framework
Webinar: Exploring the Aggregation FrameworkWebinar: Exploring the Aggregation Framework
Webinar: Exploring the Aggregation FrameworkMongoDB
 
Easy to Learn C language program
Easy to Learn C language programEasy to Learn C language program
Easy to Learn C language programHitarth Patel
 
Mongodb Aggregation Pipeline
Mongodb Aggregation PipelineMongodb Aggregation Pipeline
Mongodb Aggregation Pipelinezahid-mian
 

What's hot (19)

ZeroMQ Is The Answer: DPC 11 Version
ZeroMQ Is The Answer: DPC 11 VersionZeroMQ Is The Answer: DPC 11 Version
ZeroMQ Is The Answer: DPC 11 Version
 
ZeroMQ: Messaging Made Simple
ZeroMQ: Messaging Made SimpleZeroMQ: Messaging Made Simple
ZeroMQ: Messaging Made Simple
 
Railson dickinson 5 mil seguidores
Railson dickinson 5 mil seguidoresRailson dickinson 5 mil seguidores
Railson dickinson 5 mil seguidores
 
Dropping ACID with MongoDB
Dropping ACID with MongoDBDropping ACID with MongoDB
Dropping ACID with MongoDB
 
How to stand on the shoulders of giants
How to stand on the shoulders of giantsHow to stand on the shoulders of giants
How to stand on the shoulders of giants
 
Grails - The search is over
Grails - The search is overGrails - The search is over
Grails - The search is over
 
How to write rust instead of c and get away with it
How to write rust instead of c and get away with itHow to write rust instead of c and get away with it
How to write rust instead of c and get away with it
 
よく使うテストヘルパーの紹介 #ios_test_night
よく使うテストヘルパーの紹介 #ios_test_nightよく使うテストヘルパーの紹介 #ios_test_night
よく使うテストヘルパーの紹介 #ios_test_night
 
File handling complete programs in c++
File handling complete programs in c++File handling complete programs in c++
File handling complete programs in c++
 
08 php-files
08 php-files08 php-files
08 php-files
 
C99.php
C99.phpC99.php
C99.php
 
Solr & Lucene @ Etsy by Gregg Donovan
Solr & Lucene @ Etsy by Gregg DonovanSolr & Lucene @ Etsy by Gregg Donovan
Solr & Lucene @ Etsy by Gregg Donovan
 
Grails queries
Grails   queriesGrails   queries
Grails queries
 
When RegEx is not enough
When RegEx is not enoughWhen RegEx is not enough
When RegEx is not enough
 
QA Fest 2019. Saar Rachamim. Developing Tools, While Testing
QA Fest 2019. Saar Rachamim. Developing Tools, While TestingQA Fest 2019. Saar Rachamim. Developing Tools, While Testing
QA Fest 2019. Saar Rachamim. Developing Tools, While Testing
 
C++ adt c++ implementations
C++   adt c++ implementationsC++   adt c++ implementations
C++ adt c++ implementations
 
Webinar: Exploring the Aggregation Framework
Webinar: Exploring the Aggregation FrameworkWebinar: Exploring the Aggregation Framework
Webinar: Exploring the Aggregation Framework
 
Easy to Learn C language program
Easy to Learn C language programEasy to Learn C language program
Easy to Learn C language program
 
Mongodb Aggregation Pipeline
Mongodb Aggregation PipelineMongodb Aggregation Pipeline
Mongodb Aggregation Pipeline
 

Viewers also liked

Viewers also liked (11)

Los fantastico
Los fantasticoLos fantastico
Los fantastico
 
Los 100 fuegos
Los 100 fuegosLos 100 fuegos
Los 100 fuegos
 
UNIVERSIDAD CENTRAL DEL ECUADOR GETCHARS
UNIVERSIDAD CENTRAL DEL ECUADOR GETCHARSUNIVERSIDAD CENTRAL DEL ECUADOR GETCHARS
UNIVERSIDAD CENTRAL DEL ECUADOR GETCHARS
 
Los sdkn
Los sdknLos sdkn
Los sdkn
 
Programacion fantasticos
Programacion  fantasticosProgramacion  fantasticos
Programacion fantasticos
 
Los dskn
Los dsknLos dskn
Los dskn
 
LOS C++
LOS C++LOS C++
LOS C++
 
Informe teórico-getchars-1
Informe teórico-getchars-1Informe teórico-getchars-1
Informe teórico-getchars-1
 
Sesión formativa 15.16
Sesión formativa 15.16Sesión formativa 15.16
Sesión formativa 15.16
 
Cómic conflictos
Cómic conflictosCómic conflictos
Cómic conflictos
 
Sesión formativa 16.17
Sesión formativa 16.17Sesión formativa 16.17
Sesión formativa 16.17
 

Similar to UNIVERSIDAD CENTRAL DEL ECUADOR CAMILA ESCOBAR LOPEZ C+++

COMPUTER SCIENCE CLASS 12 PRACTICAL FILE
COMPUTER SCIENCE CLASS 12 PRACTICAL FILECOMPUTER SCIENCE CLASS 12 PRACTICAL FILE
COMPUTER SCIENCE CLASS 12 PRACTICAL FILEAnushka Rai
 
Ejercicios de estilo en la programación
Ejercicios de estilo en la programaciónEjercicios de estilo en la programación
Ejercicios de estilo en la programaciónSoftware Guru
 
Mouse programming in c
Mouse programming in cMouse programming in c
Mouse programming in cgkgaur1987
 
Presentation R basic teaching module
Presentation R basic teaching modulePresentation R basic teaching module
Presentation R basic teaching moduleSander Timmer
 
Python Workshop - Learn Python the Hard Way
Python Workshop - Learn Python the Hard WayPython Workshop - Learn Python the Hard Way
Python Workshop - Learn Python the Hard WayUtkarsh Sengar
 
So I am writing a CS code for a project and I keep getting cannot .pdf
So I am writing a CS code for a project and I keep getting cannot .pdfSo I am writing a CS code for a project and I keep getting cannot .pdf
So I am writing a CS code for a project and I keep getting cannot .pdfezonesolutions
 
Os scheduling Algorithms
Os scheduling AlgorithmsOs scheduling Algorithms
Os scheduling AlgorithmsNeelamani Samal
 
Testing CLI tools with Go
Testing CLI tools with GoTesting CLI tools with Go
Testing CLI tools with GoRicardo Gerardi
 
Introduction to source{d} Engine and source{d} Lookout
Introduction to source{d} Engine and source{d} Lookout Introduction to source{d} Engine and source{d} Lookout
Introduction to source{d} Engine and source{d} Lookout source{d}
 
Numerical analysis
Numerical analysisNumerical analysis
Numerical analysisVishal Singh
 

Similar to UNIVERSIDAD CENTRAL DEL ECUADOR CAMILA ESCOBAR LOPEZ C+++ (20)

C Language Lecture 22
C Language Lecture 22C Language Lecture 22
C Language Lecture 22
 
Linq introduction
Linq introductionLinq introduction
Linq introduction
 
String Manipulation Function and Header File Functions
String Manipulation Function and Header File FunctionsString Manipulation Function and Header File Functions
String Manipulation Function and Header File Functions
 
COMPUTER SCIENCE CLASS 12 PRACTICAL FILE
COMPUTER SCIENCE CLASS 12 PRACTICAL FILECOMPUTER SCIENCE CLASS 12 PRACTICAL FILE
COMPUTER SCIENCE CLASS 12 PRACTICAL FILE
 
Ejercicios de estilo en la programación
Ejercicios de estilo en la programaciónEjercicios de estilo en la programación
Ejercicios de estilo en la programación
 
Mouse programming in c
Mouse programming in cMouse programming in c
Mouse programming in c
 
Day3
Day3Day3
Day3
 
Presentation R basic teaching module
Presentation R basic teaching modulePresentation R basic teaching module
Presentation R basic teaching module
 
Python Workshop - Learn Python the Hard Way
Python Workshop - Learn Python the Hard WayPython Workshop - Learn Python the Hard Way
Python Workshop - Learn Python the Hard Way
 
Alastair Butler - 2015 - Round trips with meaning stopovers
Alastair Butler - 2015 - Round trips with meaning stopoversAlastair Butler - 2015 - Round trips with meaning stopovers
Alastair Butler - 2015 - Round trips with meaning stopovers
 
C programms
C programmsC programms
C programms
 
So I am writing a CS code for a project and I keep getting cannot .pdf
So I am writing a CS code for a project and I keep getting cannot .pdfSo I am writing a CS code for a project and I keep getting cannot .pdf
So I am writing a CS code for a project and I keep getting cannot .pdf
 
Design problem
Design problemDesign problem
Design problem
 
C Language Lecture 13
C Language Lecture 13C Language Lecture 13
C Language Lecture 13
 
Os scheduling Algorithms
Os scheduling AlgorithmsOs scheduling Algorithms
Os scheduling Algorithms
 
Testing CLI tools with Go
Testing CLI tools with GoTesting CLI tools with Go
Testing CLI tools with Go
 
Introduction to source{d} Engine and source{d} Lookout
Introduction to source{d} Engine and source{d} Lookout Introduction to source{d} Engine and source{d} Lookout
Introduction to source{d} Engine and source{d} Lookout
 
Numerical analysis
Numerical analysisNumerical analysis
Numerical analysis
 
Java Week4(C) Notepad
Java Week4(C)   NotepadJava Week4(C)   Notepad
Java Week4(C) Notepad
 
Data structures
Data structuresData structures
Data structures
 

Recently uploaded

Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 

Recently uploaded (20)

Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 

UNIVERSIDAD CENTRAL DEL ECUADOR CAMILA ESCOBAR LOPEZ C+++

  • 1. CODIGO VISUAL BASIC Sub copia_y_pega() Dim texto As String Dim contador As Integer Dim contador2 As Integer Dim contador3 As Integer Open "C:UsersFreddyDocumentsprueba.txt" For Input As #1 texto = Input(LOF(1), #1) MsgBox ("PROGRAMA PARA CONTAR MAYUSCULAS,MINUSCULAS,VOCALES DESDE UN ARCHIVO DE TEXTO") For i = 1 To Len(texto) If Mid(texto, i, 1) = "b" Or Mid(texto, i, 1) = "c" Or Mid(texto, i, 1) = "d" Or Mid(texto, i, 1) = "f" Or Mid(texto, i, 1) = "g" Or Mid(texto, i, 1) = "h" Or Mid(texto, i, 1) = "j" Or Mid(texto, i, 1) = "k" Or Mid(texto, i, 1) = "l" Or Mid(texto, i, 1) = "m" Or Mid(texto, i, 1) = "n" Or Mid(texto, i, 1) = "ñ" Or Mid(texto, i, 1) = "p" Or Mid(texto, i, 1) = "q" Or Mid(texto, i, 1) = "r" Or Mid(texto, i, 1) = "s" Or Mid(texto, i, 1) = "t" Or Mid(texto, i, 1) = "v" Or Mid(texto, i, 1) = "w" Or Mid(texto, i, 1) = "x" Or Mid(texto, i, 1) = "y" Or Mid(texto, i, 1) = "z" Then contador = contador + 1 End If If Mid(texto, i, 1) = "a" Or Mid(texto, i, 1) = "e" Or Mid(texto, i, 1) = "i" Or Mid(texto, i, 1) = "o" Or Mid(texto, i, 1) = "u" Then contador2 = contador2 + 1 End If If Mid(texto, i, 1) = "A" Or Mid(texto, i, 1) = "B" Or Mid(texto, i, 1) = "C" Or Mid(texto, i, 1) = "D" Or Mid(texto, i, 1) = "E" Or Mid(texto, i, 1) = "F" Or Mid(texto, i, 1) = "G" Or Mid(texto, i, 1) = "H" Or Mid(texto, i, 1) = "I" Or Mid(texto, i, 1) = "J" Or Mid(texto, i, 1) = "K" Or Mid(texto, i, 1) = "L" Or Mid(texto, i, 1) = "M" Or Mid(texto, i, 1) = "N" Or Mid(texto, i, 1) = "Ñ" Or Mid(texto, i, 1) = "O" Or Mid(texto, i, 1) = "P" Or Mid(texto, i, 1) = "Q" Or Mid(texto, i, 1) = "R" Or Mid(texto, i, 1) = "S" Or Mid(texto, i, 1) = "T" Or Mid(texto, i, 1) = "U" Or Mid(texto, i, 1) = "V" Or Mid(texto, i, 1) = "W" Or Mid(texto, i, 1) = "X" Or Mid(texto, i, 1) = "Y" Or Mid(texto, i, 1) = "Z" Then contador3 = contador3 + 1 End If Next i MsgBox ("El numero de mayusculas es: " & contador3) MsgBox ("El numero de consonantes es: " & contador) MsgBox ("El numero de vocales es: " & contador2) Close #1 End Sub
  • 2. LENGUAJE C #include "stdio.h" #include "stdafx.h" #include "string.h" #include "stdlib.h" # include "fstream" int main(int argc, char **argv) { FILE *pfsArchivo; char ch, txt[300] = ""; int j = 0; int a = 0, e = 0, i = 0, o = 0, u = 0, acumulador = 0, suma = 0, acumulador2 = 0; int nas = 0, nes = 0, nis = 0, nos = 0, nus = 0, nbs = 0, ncs = 0, nds = 0, nfs = 0, ngs = 0, nhs = 0, nps = 0, nqs = 0, nrs = 0, nss = 0, nts = 0, nvs = 0, njs = 0, nks = 0, nls = 0, nms = 0, nns = 0, nñs = 0, nws = 0, nxs = 0, nys = 0, nzs = 0; printf("t PROGRAMA PARA ENCONTRAR MAYUSCULAS, VOCALES Y CONSONANTESn"); printf("ttt DESDE UN ARCHIVO DE TEXTOn"); printf("nCONTENIDO DE SU DOCUMENTO:n"); pfsArchivo = fopen("C:UsersFreddyDocumentsprueba.txt", "r"); if (pfsArchivo == NULL) { printf("No se pudo abrir el archivo %s n", "prueba.txt"); } else { while ((txt[j] = getc(pfsArchivo)) != EOF) { ch = txt[j]; switch (ch) {
  • 3. case 'a': nas++; txt[j] = 'a'; break; case 'e': nes++; txt[j] = 'e'; break; case 'i': nis++; txt[j] = 'i'; break; case 'o': nos++; txt[j] = 'o'; break; case 'u': nus++; txt[j] = 'u'; break; case 'b': nbs++; txt[j] = 'b'; break; case 'c': ncs++; txt[j] = 'c'; break; case 'd': nds++; txt[j] = 'd'; break; case 'f': nfs++; txt[j] = 'f'; break;
  • 4. case 'g': ngs++; txt[j] = 'g'; break; case 'h': nhs++; txt[j] = 'h'; break; case 'j': njs++; txt[j] = 'j'; break; case 'k': nks++; txt[j] = 'k'; break; case 'l': nls++; txt[j] = 'l'; break; case 'm': nms++; txt[j] = 'm'; break; case 'n': nns++; txt[j] = 'n'; break; case 'ñ': nñs++; txt[j] = 'ñ'; break; case 'p': nps++; txt[j] = 'p'; break;
  • 5. case 'q': nqs++; txt[j] = 'q'; break; case 'r': nrs++; txt[j] = 'r'; break; case 's': nss++; txt[j] = 's'; break; case 't': nts++; txt[j] = 't'; break; case 'v': nvs++; txt[j] = 'v'; break; case 'w': nws++; txt[j] = 'w'; break; case 'x': nxs++; txt[j] = 'x'; break; case 'y': nys++; txt[j] = 'y'; break; case 'z': nzs++; txt[j] = 'z'; break; }
  • 6. j++; } for (j = 0; j < 100; j++) { if (txt[j] >= 65 && txt[j] <= 90) { suma++; } } printf("n%sn", &txt); } acumulador2 = acumulador2 + nbs + ncs + nds + nfs + ngs + nhs + nps + nqs + nrs + nss + nts + nvs + njs + nks + nls + nms + nns + nñs + nws + nxs + nys + nzs; acumulador = acumulador + nas + nes + nis + nos + nus; printf("nOBSERVACIONES :n"); printf("nEl numero de mayusculas es: %d", suma); printf("nEl numero de vocales es: %d", acumulador); printf("nEl numero de consonantes es: %d", acumulador2); fclose(pfsArchivo); getchar(); return 0; } CODIGO JAVA package javaapplication4; import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.util.Scanner; public class JavaApplication4 { public static void main(String[] args) { Scanner dato = new Scanner(System.in); int Contador1= 0; int Contador2 = 0;
  • 7. int Contador = 0; System.out.println("t PROGRAMA PARA ENCONTRAR MAYUSCULAS, VOCALES Y CONSONANTESn"); System.out.println("ttt DESDE UN ARCHIVO DE TEXTOn"); System.out.println("nCONTENIDO DE SU DOCUMENTO:"); try { FileReader fr = new FileReader("C:UsersFreddyDocumentsprueba.txt"); BufferedReader bf = new BufferedReader(fr); String sCadena; sCadena="prueba.txt"; while ((sCadena = bf.readLine())!=null) { System.out.println(sCadena); for(int i=0; i<sCadena.length(); i++) { if(sCadena.charAt(i) == 'a' || sCadena.charAt(i) == 'e' || sCadena.charAt(i) == 'i' || sCadena.charAt(i) == 'o' || sCadena.charAt(i) == 'u') Contador1++; else if(sCadena.charAt(i) == 'b' || sCadena.charAt(i) == 'c' || sCadena.charAt(i) == 'd' || sCadena.charAt(i) == 'f' || sCadena.charAt(i) == 'g'||sCadena.charAt(i) == 'h' || sCadena.charAt(i) == 'j' || sCadena.charAt(i) == 'k' || sCadena.charAt(i) == 'l' || sCadena.charAt(i) == 'm'||sCadena.charAt(i) == 'n' || sCadena.charAt(i) == 'ñ' || sCadena.charAt(i) == 'p' || sCadena.charAt(i) == 'q' || sCadena.charAt(i) == 'r'||sCadena.charAt(i) == 's' || sCadena.charAt(i) == 't' || sCadena.charAt(i) == 'v' || sCadena.charAt(i) == 'w' || sCadena.charAt(i) == 'x'|| sCadena.charAt(i) == 'y'|| sCadena.charAt(i) == 'z') Contador2++; else if(sCadena.charAt(i) == 'A' || sCadena.charAt(i) == 'E' || sCadena.charAt(i) == 'I' || sCadena.charAt(i) == 'O' || sCadena.charAt(i) == 'U') Contador++; else if (sCadena.charAt(i) == 'B' || sCadena.charAt(i) == 'C' || sCadena.charAt(i) == 'D' || sCadena.charAt(i) == 'E' || sCadena.charAt(i) == 'F'||sCadena.charAt(i) == 'J' || sCadena.charAt(i) == 'H' || sCadena.charAt(i) == 'K' || sCadena.charAt(i) == 'L' || sCadena.charAt(i) == 'M'||sCadena.charAt(i) == 'N' || sCadena.charAt(i) == 'Ñ' || sCadena.charAt(i) == 'O' || sCadena.charAt(i) == 'P' || sCadena.charAt(i) == 'Q'||sCadena.charAt(i) == 'R' || sCadena.charAt(i) == 'S' || sCadena.charAt(i) == 'T' || sCadena.charAt(i) == 'V' || sCadena.charAt(i) == 'W'||sCadena.charAt(i) == 'X'||sCadena.charAt(i) == 'Y'|| sCadena.charAt(i) == 'Z') {
  • 8. Contador++; } } } System.out.println("nOBSERVACIONES:"); System.out.print("nEl numero de vocales es: "+Contador1); System.out.print("nEl numero de consonantes es: "+Contador2); System.out.print("nEl numero de mayusculas es: "+Contador); } catch (FileNotFoundException fnfe) { } catch (IOException ioe) { } } }