-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vote_CAsting.cpp
54 lines (48 loc) · 1.26 KB
/
Vote_CAsting.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#include <iostream>
#include <conio.h>
#include <windows.h>
//#include <stdlib.h>
//#include <string>
//#include <istream>
//#include<bits/stdc++.h>
COORD cord = {0,0};
void gotoxy(int x , int y)
{
cord.X = x;
cord.Y = y;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),cord);
}
using namespace std;
main()
{
string name, fname;
int age;
//cout<<"Hello World";
//return 0:
system("CLS");
cout<<"Hello Welcome.\n";
cout<<"So Let's Start.\n"<<endl;
cout<<"Kindly press Enter key:";
getch();
system("CLS");
cout<<"Enter Your Name:\n";
getline(cin,name);
cout<<"\nYour Name Is:\n\n"<<"\t\t"<<name<<endl;
cout<<endl<<endl;
cout<<"Enter Your Father Name:\n";
getline(cin,fname);
cout<<"\nYour Father Name Is:\n\n"<<"\t\t"<<fname<<endl;
getch();
system("CLS");
cout<<"\nEnter Your Age (In years):"<<endl;
cin>>age;
cout<<"\nYour Age Is:\n\n"<<"\t\t"<<age<<" Years"<<endl;
cout<<"\n\nPress ENTER Key for your Vote Casting Verification:-"<<endl;
getch();
if(age>=18)
cout<<"\n\t\tCongratulations! You can Cast Vote.";
else
cout<<"\n\t\tOops! You can't Cast Vote.";
//getch();
getch();
}