VB icon

Civil Status Checker in C#

Email
Submitted on: 10/25/2016 2:42:03 AM
By: Jake R. Pomperada  
Level: Beginner
User Rating: Unrated
Compatibility: C#
Views: 3074
author picture
 
     Hi there in this article I would like to share with you a very simple program that will check the civil status of a person whether the person is single, married, widow, annulled or separated from their spouse. What does the program do is to ask the users name and then it will give a selection of values 1 for single, 2 for married, 3 for widow, 4 - annulled and 5 - separated. If the user invalid value our program will also the user that the value that is being provided is invalid. The purpose of this program is to teach the person understand if else compounded statement in C#. I hope you will find my work useful. Thank you very much. Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com. My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com. My mobile number here in the Philippines is 09173084360.

 
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
				
//**************************************
// Name: Civil Status Checker in C#
// Description:Hi there in this article I would like to share with you a very simple program that will check the civil status of a person whether the person is single, married, widow, annulled or separated from their spouse. What does the program do is to ask the users name and then it will give a selection of values 1 for single, 2 for married, 3 for widow, 4 - annulled and 5 - separated. If the user invalid value our program will also the user that the value that is being provided is invalid. The purpose of this program is to teach the person understand if else compounded statement in C#. I hope you will find my work useful. Thank you very much.
Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com. 
My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com. 
My mobile number here in the Philippines is 09173084360.
// By: Jake R. Pomperada
//**************************************

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
// Program : Civil Status Checker in C#
// Author : Mr. Jake R. Pomperada, MAED-IT
// Date: October 25, 2016 Tuesday
namespace civil_status
{
class civil_status
{
static void Main(string[] args)
{
int status = 0;
string reply;
int n = 0;
String user;
do {
Console.Clear();
Console.Write("\n\n");
Console.Write("\t Civil Status Checker");
Console.Write("\n\n");
Console.Write("What is your name : ");
user = Console.ReadLine();
Console.Write("\n");
Console.WriteLine("1 - Single 2 - Married 3 - Widow 4 - Annulled 5 - Separated ");
Console.Write("\n");
Console.Write("What is your Civil Status : ");
status = Convert.ToInt32(Console.ReadLine());
Console.Write("\n");
 
if (status == 1) {
Console.Write("\n");
Console.Write(" Hi {0} you are still Single. ",user);
}
else if (status == 2) {
Console.Write("\n");
Console.Write(" Hi {0} you are already Married. ",user);
}
else if (status == 3) {
Console.Write("\n\n");
Console.Write(" Hi {0} you are already Widow. ",user);
}
else if (status == 4) {
Console.Write("\n");
Console.Write(" Hi {0} you are already Annulled in your marriage.",user);
}
else if (status == 5) {
Console.Write("\n\n");
Console.Write(" Hi {0} you are already Separated from your Spouse. ",user);
}
else {
Console.Write("\n");
Console.Write(" Hi {0} you are already Separated from your Spouse. ",user);
}
 Console.Write("\n\n");
Console.Write("Do You Want To Continue? Y/N : ");
reply = Console.ReadLine();
if (reply == "y" || reply == "Y")
{
continue;
}
else if (reply == "n" || reply == "N")
{
Console.Write("\n\n");
Console.Write("Thank You For Using This Software.");
Console.Write("\n\n");
Console.ReadLine();
break;
}
 
} while (n == 0);
}
}
} // End of Program


Other 41 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments


 There are no comments on this submission.
 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.