Opzione 4
This commit is contained in:
parent
8016697863
commit
19bcef7b32
12
Program.cs
12
Program.cs
@ -40,6 +40,7 @@ class Program {
|
||||
break;
|
||||
case 4:
|
||||
Console.Clear();
|
||||
Codifica();
|
||||
Pausa();
|
||||
break;
|
||||
case 5:
|
||||
@ -102,4 +103,15 @@ class Program {
|
||||
}
|
||||
Console.WriteLine();
|
||||
}
|
||||
|
||||
static void Codifica() {
|
||||
string stringa = Input();
|
||||
Console.Write("Inserire un numero: ");
|
||||
int codice = Convert.ToInt32(Console.ReadLine());
|
||||
|
||||
for (int i = 0; i < stringa.Length; i++) {
|
||||
Console.Write(Convert.ToChar(stringa[i] + codice));
|
||||
}
|
||||
Console.WriteLine();
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user