Beruflich Dokumente
Kultur Dokumente
22
else
23
{
24
tReprobados++;
25
tNotaReprobados += nota;
26
}
27
}
28
29
Console.WriteLine("> Alumnos aprobados {0} con un promedio de {1}
puntos\n", tAprobados, Math.Round((tNotaAprobados/tAprobados),2));
30
Console.WriteLine("> Alumnos reprobados {0} con un promedio de {1}
puntos\n", tReprobados, Math.Round((tNotaReprobados / tReprobados),2));
31
Console.WriteLine("> El promedio total del curso es de {0} puntos \n",
Math.Round((tNotaCurso/cantidad),2));
32
33
Console.WriteLine("+ Presione cualquier tecla pata terminar");
34
Console.ReadKey();
35
}
01 class Program
02
{
03
static void Main(string[] args)
04
{
05
06
int[,] a = { { 0, 2, 3 }, { 1, 2, 0 }, { 0, 2, 7 } };
07
int[,] b = { { 1, 2, 1 }, { 4, 5, 6 }, { 0, 6, 1 } };
08
09
10
Console.WriteLine("Matriz A");
11
imprimir(a);
12
Console.WriteLine("\nMatriz B");
13
imprimir(b);
14
Console.WriteLine("\nMatriz Resultantes");
15
int[,] c = sumar(a, b);
16
imprimir(c);
17
18
Console.ReadKey();
19
}
20
21
22
static int[,] sumar( int[,] a, int[,] b)
23
{
24
int[,] c = new int[3, 3];
25
26
for (int fila = 0; fila < 3; fila++)
27
{
28
for (int col = 0; col < 3; col++)
29
{
30
c[fila, col] = a[fila, col] + b[fila, col];
31
}
32
}
33
return c;
34
}
35
36
37
static void imprimir( int[,] matriz)
38
{
39
for (int f = 0; f < 3; f++)
40
{
41
for (int c = 0; c < 3; c++)
42
{
43
Console.Write(" {0} |",matriz[f,c]);
44
}
45
Console.WriteLine("");
46
}
47
}
48
49
50
}
programa para cajero automatico
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
Program cajero;
static void Main(string[] args)
{
use;
crt;
var;
don; ret; consig; sald; serv:real;
opc; cla; opci;opcio:integer;
begin;
whileopc.<6; DOBEGIN;
clrscr;
gotoxy(20,3);
Console.ForegroundColor;
Writeline;("----BIENVENIDO A SUS CAJEROS AUTOMATICOS DIANA----");
WriteLline;("");
gotoxy(20,3);
Console.ForegroundColor(blue);
WriteLine("por favor inserte su tarjeta y siga las intrucciones");
gotoxy(20,5);
Console.ForegroundColor(blue);
WriteLine("digite su clave por favor");
ReadLine(cla);
if cla<>4711; thenbegin;
gotoxy(20,6);
Console.ForegroundColor(blue);
WriteLine("su clave es incorrecta;rectifiquela por favor");
ReadLine(cla);
end,
WriteLine("");
if cla;=4711;THENBEGIN;
clrscr;
WriteLine("*****menu principal******");
}
}
}