-
Lenguaje
C#
-
Descripción
Leer las notas de una clase de informática y deducir todas aquellas que son NOTABLES (>= 14 y < 18).
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
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
using System;
namespace NotasNotables
{
class NotasNotables
{
static void Main(string[] args)
{
double nota;
char tecla_repetir;
do
{
Console.Clear();
Console.Write("Ingresa el valor de nota: ");
nota = double.Parse(Console.ReadLine());
if(nota>=14&¬a<18)
Console.WriteLine("Notable");
Console.WriteLine();
Console.Write("\u00BFDeseas repetir el proceso? (S/N): ");
do
{
tecla_repetir = Console.ReadKey().KeyChar;
} while (tecla_repetir != 's' && tecla_repetir != 'n' && tecla_repetir != 'S' && tecla_repetir != 'N');
} while (tecla_repetir == 's' || tecla_repetir == 'S');
}
}
}
namespace NotasNotables
{
class NotasNotables
{
static void Main(string[] args)
{
double nota;
char tecla_repetir;
do
{
Console.Clear();
Console.Write("Ingresa el valor de nota: ");
nota = double.Parse(Console.ReadLine());
if(nota>=14&¬a<18)
Console.WriteLine("Notable");
Console.WriteLine();
Console.Write("\u00BFDeseas repetir el proceso? (S/N): ");
do
{
tecla_repetir = Console.ReadKey().KeyChar;
} while (tecla_repetir != 's' && tecla_repetir != 'n' && tecla_repetir != 'S' && tecla_repetir != 'N');
} while (tecla_repetir == 's' || tecla_repetir == 'S');
}
}
}