##C#, 252 247 245 232 216 Bytes ##
C#, 252 247 245 232 216 Bytes
The size is pretty bad compared to the other solutions but nevertheless...
using System;using System.Linq;class p{static void Main(){var c="";var i=Console.ReadLine();var r=new Random();for(int b=0;b++<i.Count();){int d=r.Next(10);Console.Write((char)(i[b]+d));c+=d;}Console.Write("\n"+c);}}
This is my second ever answer to a codegolf and I'm quite a beginner considering C# so I'd appreciate to hear how to get it shorter :)
Ungolfed:
using System;
using System.Linq;
class p
{
static void Main()
{
var c = "";
var i = Console.ReadLine();
var r = new Random();
for (int b = 0; b++ < i.Count();)
{
int d = r.Next(10);
Console.Write((char)(i[b] + d));
c += d;
}
Console.Write("\n" + c);
}
}
- Saved 5 Bytes thanks to @FryAmTheEggman
- Saved 2 Bytes thanks to @theLambGoat
- Saved 7 Bytes by removing
static
from class p - Saved 24 Bytes thanks to @milk