Aadhaar Registration
Scenario:
The vakrangee software company enroll members by obtaining their core details.
Write a program that enables the admin to continuously capture the user information like name, place and marital status until the admin say 'no'.
Get the information from the user and allow the allow to say 'y' or 'n' to continue with next user information.
Display the obtained user information.
Use the Program class only.
Do not use Environment.Exit to terminate the program.
Sample Input 1:
Enter Name : Rahul
Enter Place : Delhi
Enter marital status(y/n) : n
Do you wish to continue(y/n) : y
Enter Name : John
Enter Place : Bangalore
Enter marital status(y/n) : y
Do you wish to continue(y/n) : n
Sample Output 1:
Confirming Information
Rahul
Delhi
Married : n
Confirming Information
John
Bangalore
Married : y
Answers
Answer:using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProgFundamentals9
public class Program
{
public static void Main(string[] args)
{
char choice;
do{
Console.WriteLine("Enter Name : ");
string name=Console.ReadLine();
Console.WriteLine("Enter Place : ");
string place=Console.ReadLine();
Console.WriteLine("Enter martial status(y/n) : ");
char ms=Console.ReadLine()[0];
Console.WriteLine("Do you wish to continue(y/n) : ");
choice=Console.ReadLine()[0];
Console.WriteLine("Confirming Information");
Console.WriteLine(name);
Console.WriteLine(place);
Console.WriteLine("Married : "+ms);
}while(choice== 'y');
}
}
}
Explanation: