i wrote this program to ask details of a person but the i am not getting my desired output. my out is all jammed up
how do i fix this
//First program written by Group 1
//This program takes the details of students and submits it
#include <iostream>
using namespace std;
int main ()
{
int Fullname, Phonenumber, Course, Level, ID;
int submit;
cout << "Welcome to Group 1 Log in Page";
cout <<"Enter your full name";
cin >>Fullname;
cout <<"Enter your phone number";
cin >>Phonenumber;
cout <<"Enter your course";
cin >>Course;
cout <<"Enter your Level";
cin >>Level;
cout <<"Enter your ID";
cin >>ID;
cout <<submit;
cout <<"Thank you for using Group 1's Program. Have a great day!!!";
return 0;
}
#include <iostream>
#include <conio.h>
#include <string>
using namespace std;
int main ()
{
int Phonenumber, Course, Level, ID;
string Fullname;
cout << "Welcome to Group 1 Log in Page"<<endl;
cout <<"Enter your full name:"<<endl;
getline(cin, Fullname);
cout <<"Enter your phone number:"<<endl;
cin >>Phonenumber;
cout <<"Enter your course:"<<endl;
cin >>Course;
cout <<"Enter your Level:"<<endl;
cin >>Level;
cout <<"Enter your ID:"<<endl;
cin >>ID;
cout << "Excellent! Your info is:"<<endl;
cout<<"Full name : "<< Fullname <<endl;
cout<<"Phone number : "<< Phonenumber <<endl;
cout<<"Course : "<< Course <<endl;
cout<<"Level : "<< Level <<endl;
cout<<"ID : "<< ID <<endl;
cout <<"Thank you for using Group 1's Program. Have a great day!!!";
_getch();
return 0;
}
Need a fast expert's response?
Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Learn more about our help with Assignments:
C++