SlideShare a Scribd company logo
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 Version
Ian Barber
 
ZeroMQ: Messaging Made Simple
ZeroMQ: Messaging Made SimpleZeroMQ: Messaging Made Simple
ZeroMQ: Messaging Made Simple
Ian Barber
 
Railson dickinson 5 mil seguidores
Railson dickinson 5 mil seguidoresRailson dickinson 5 mil seguidores
Railson dickinson 5 mil seguidores
Railson Dickinson
 
Dropping ACID with MongoDB
Dropping ACID with MongoDBDropping ACID with MongoDB
Dropping ACID with MongoDB
kchodorow
 
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
Ian Barber
 
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
Flavien Raynaud
 
Grails - The search is over
Grails - The search is overGrails - The search is over
Grails - The search is over
Felipe Coutinho
 
よく使うテストヘルパーの紹介 #ios_test_night
よく使うテストヘルパーの紹介 #ios_test_nightよく使うテストヘルパーの紹介 #ios_test_night
よく使うテストヘルパーの紹介 #ios_test_night
Kenji 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
 
08 php-files
08 php-files08 php-files
08 php-files
hoangphuc2587
 
C99.php
C99.phpC99.php
C99.php
veng33k
 
Solr & Lucene @ Etsy by Gregg Donovan
Solr & Lucene @ Etsy by Gregg DonovanSolr & Lucene @ Etsy by Gregg Donovan
Solr & Lucene @ Etsy by Gregg Donovan
Gregg Donovan
 
Grails queries
Grails   queriesGrails   queries
Grails queries
Husain Dalal
 
When RegEx is not enough
When RegEx is not enoughWhen RegEx is not enough
When RegEx is not enough
Nati 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 Testing
QAFest
 
C++ adt c++ implementations
C++   adt c++ implementationsC++   adt c++ implementations
C++ adt c++ implementations
Rex Mwamba
 
Webinar: Exploring the Aggregation Framework
Webinar: Exploring the Aggregation FrameworkWebinar: Exploring the Aggregation Framework
Webinar: Exploring the Aggregation Framework
MongoDB
 
Easy to Learn C language program
Easy to Learn C language programEasy to Learn C language program
Easy to Learn C language program
Hitarth Patel
 
Mongodb Aggregation Pipeline
Mongodb Aggregation PipelineMongodb Aggregation Pipeline
Mongodb Aggregation Pipeline
zahid-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
 
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
 
Grails - The search is over
Grails - The search is overGrails - The search is over
Grails - The search is over
 
よく使うテストヘルパーの紹介 #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

Virtual Keyboard
Virtual KeyboardVirtual Keyboard
Virtual Keyboard
Bhaskar Jyoti Sarma
 
Liwen
LiwenLiwen
Companies financial result updated on 6t th august 2015
Companies financial result updated on 6t th august 2015Companies financial result updated on 6t th august 2015
Companies financial result updated on 6t th august 2015
RAFI SECURITIES (PVT.)LTD.
 
Hak anak dalam islam
Hak anak dalam islamHak anak dalam islam
Hak anak dalam islam
Lukman Hakim
 
Recently completed projects
Recently completed projectsRecently completed projects
Recently completed projects
Kyle Simonetta
 
FBIF2015:aarlt 全球化和本地化
FBIF2015:aarlt 全球化和本地化FBIF2015:aarlt 全球化和本地化
FBIF2015:aarlt 全球化和本地化
Simba Events
 
UNIVERSIDAD CENTRAL DEL ECUADOR C++
UNIVERSIDAD CENTRAL DEL ECUADOR C++UNIVERSIDAD CENTRAL DEL ECUADOR C++
UNIVERSIDAD CENTRAL DEL ECUADOR C++
CamiEscobar1995
 
Jason Tew Portfolio
Jason Tew PortfolioJason Tew Portfolio
Jason Tew Portfolio
Jason Tew
 
翡翠為何會變?
翡翠為何會變?翡翠為何會變?
翡翠為何會變?
neo423
 
April 2015 assignment 1
April 2015 assignment 1April 2015 assignment 1
April 2015 assignment 1
AdeleLu
 

Viewers also liked (10)

Virtual Keyboard
Virtual KeyboardVirtual Keyboard
Virtual Keyboard
 
Liwen
LiwenLiwen
Liwen
 
Companies financial result updated on 6t th august 2015
Companies financial result updated on 6t th august 2015Companies financial result updated on 6t th august 2015
Companies financial result updated on 6t th august 2015
 
Hak anak dalam islam
Hak anak dalam islamHak anak dalam islam
Hak anak dalam islam
 
Recently completed projects
Recently completed projectsRecently completed projects
Recently completed projects
 
FBIF2015:aarlt 全球化和本地化
FBIF2015:aarlt 全球化和本地化FBIF2015:aarlt 全球化和本地化
FBIF2015:aarlt 全球化和本地化
 
UNIVERSIDAD CENTRAL DEL ECUADOR C++
UNIVERSIDAD CENTRAL DEL ECUADOR C++UNIVERSIDAD CENTRAL DEL ECUADOR C++
UNIVERSIDAD CENTRAL DEL ECUADOR C++
 
Jason Tew Portfolio
Jason Tew PortfolioJason Tew Portfolio
Jason Tew Portfolio
 
翡翠為何會變?
翡翠為何會變?翡翠為何會變?
翡翠為何會變?
 
April 2015 assignment 1
April 2015 assignment 1April 2015 assignment 1
April 2015 assignment 1
 

Similar to C++

C Language Lecture 22
C Language Lecture 22C Language Lecture 22
C Language Lecture 22
Shahzaib Ajmal
 
Linq introduction
Linq introductionLinq introduction
Linq introduction
Mohammad Alyan
 
String Manipulation Function and Header File Functions
String Manipulation Function and Header File FunctionsString 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
Anushka 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ón
Software Guru
 
Mouse programming in c
Mouse programming in cMouse programming in c
Mouse programming in c
gkgaur1987
 
Day3
Day3Day3
Presentation R basic teaching module
Presentation R basic teaching modulePresentation R basic teaching module
Presentation R basic teaching module
Sander Timmer
 
Pipe
PipePipe
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
Utkarsh Sengar
 
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
Association for Computational Linguistics
 
C programms
C programmsC programms
C programms
Mukund Gandrakota
 
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
ezonesolutions
 
Design problem
Design problemDesign problem
Design problem
Sanjay Kumar Chakravarti
 
C Language Lecture 13
C Language Lecture 13C Language Lecture 13
C Language Lecture 13
Shahzaib Ajmal
 
Os scheduling Algorithms
Os scheduling AlgorithmsOs scheduling Algorithms
Os scheduling Algorithms
Neelamani Samal
 
Testing CLI tools with Go
Testing CLI tools with GoTesting CLI tools with Go
Testing CLI tools with Go
Ricardo 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 analysis
Vishal Singh
 
Java Week4(C) Notepad
Java Week4(C)   NotepadJava Week4(C)   Notepad
Java Week4(C) Notepad
Chaitanya Rajkumar Limmala
 

Similar to 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
 
Pipe
PipePipe
Pipe
 
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
 

Recently uploaded

BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
Nguyen Thanh Tu Collection
 
Solutons Maths Escape Room Spatial .pptx
Solutons Maths Escape Room Spatial .pptxSolutons Maths Escape Room Spatial .pptx
Solutons Maths Escape Room Spatial .pptx
spdendr
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
S. Raj Kumar
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
haiqairshad
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
HajraNaeem15
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
Jyoti Chand
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
siemaillard
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Denish Jangid
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
MysoreMuleSoftMeetup
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
TechSoup
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
B. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdfB. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdf
BoudhayanBhattachari
 

Recently uploaded (20)

BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
 
Solutons Maths Escape Room Spatial .pptx
Solutons Maths Escape Room Spatial .pptxSolutons Maths Escape Room Spatial .pptx
Solutons Maths Escape Room Spatial .pptx
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
B. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdfB. Ed Syllabus for babasaheb ambedkar education university.pdf
B. Ed Syllabus for babasaheb ambedkar education university.pdf
 

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) { } } }