i need some help guys i hope u can help me ! :)

 Console.WriteLine("book name"); bname = Console.ReadLine(); Console.WriteLine("book writer's name"); bwriter = Console.ReadLine(); Console.WriteLine("book price"); bprice = int.Parse(Console.ReadLine()); Console.WriteLine("book pages"); bpages = int.Parse(Console.ReadLine()); Book b1 = new Book(bname, bwriter, bpages, bprice); Console.WriteLine("book name"); bname = Console.ReadLine(); Console.WriteLine("book writer's name"); bwriter = Console.ReadLine(); Console.WriteLine("book price"); bprice = int.Parse(Console.ReadLine()); Console.WriteLine("book pages"); bpages = int.Parse(Console.ReadLine()); Book b2 = new Book(bname, bwriter, bpages, bprice); 

i have this code and i want to replace this with one for/while is it possible ?

by dan00058 via /r/csharp

Leave a Reply