Question

2) Write a C++ (using visual studio) program that display the following information, each on a separate line a. your name b. c. your college major

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Below is your code. Let me know in comments, If I am missing anything or misunderstood this

#include<iostream>

using namespace std;

int main() {

string name = "Jon Doe";

int studentNum = 1234;

string collegeMaj = "CSE";

cout<<"Your Name: "<<name<<endl;

cout<<"Student #: "<<studentNum<<endl;

cout<<"Your College Major: "<<collegeMaj<<endl;

return 0;

}

Add a comment
Know the answer?
Add Answer to:
2) Write a C++ (using visual studio) program that display the following information, each on a...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • C++ and Using Microsoft Visual Studio. Write 2 programs: One program will use a structure to...

    C++ and Using Microsoft Visual Studio. Write 2 programs: One program will use a structure to store the following data on a company division: Division Name (East, West, North, and South) Quarter (1, 2, 3, or 4) Quarterly Sales The user should be asked for the four quarters' sales figures for the East, West, North, and South divisions. The data for each quarter for each division should be written to a file. The second program will read the data written...

  • C++ (i) Write a program that displays the following pattern: * *** ***** ******* ***** ***...

    C++ (i) Write a program that displays the following pattern: * *** ***** ******* ***** ***    * (ii) Katy bought 750 shares of stock at a price of $35.00 per share. She must pay her stockbroker a 2 percent commission for the transaction. Write a program that calculates and displays the following: The amount paid for the stock alone (without the commission) The amount of the commission) The total amount paid (stock plus commission) (iii) Write a program that...

  • using Microsoft Visual Studio C++ write a compute program that will allow the user to: 1.Get...

    using Microsoft Visual Studio C++ write a compute program that will allow the user to: 1.Get a Factorial (using a loop) 2. perform addition and subtraction 3.allow the user to quit the program

  • answer the following using C# Design and program a Visual Studio Console project in C# that...

    answer the following using C# Design and program a Visual Studio Console project in C# that allows your user to enter a number. The program will examine the number to see if it is prime. If it is prime, it will print the next higher prime and the next lower primes to the console. If the number entered by the user is not prime, display a message to that effect. All code should be written by you. Do not copy/paste...

  • using visual studio 2) For each of the following, write C++ statements that perform the specified...

    using visual studio 2) For each of the following, write C++ statements that perform the specified task.. (Ref: classwork named pointer2) a) Declare a built-in array of type unsigned int called values with five elements, and initialize the elements to the even integers from 2 to 10. b) Declare a pointer vPtr that points to a variable of type unsigned int. c) Write two separate statements that assign the starting address of array values to pointer variable vPtr. d) Use...

  • Using assembly language in microwoft visual studio write the following code with procedure with c...

    using assembly language in microwoft visual studio write the following code with procedure with correct number of Fib numbers Your program should detect the largest Fib number that can be calculated. Besides storing the result in an array, print them on the screen.

  • Write a program using Visual Studio 2017 that accepts four (4) lines of input: • The...

    Write a program using Visual Studio 2017 that accepts four (4) lines of input: • The first line contains a float value in 4.2f format • The second line contains a char value • The third line contains a 4-digit int value • The fourth line contains a char value and then displays all of the input on a single line Phone Number Write a program that accepts a phone number of the form +1(xxx)-xxxxxxx where x is a digit,...

  • Write a c# program in Microsoft visual studio to determine if the following numbers are even...

    Write a c# program in Microsoft visual studio to determine if the following numbers are even or not. Create an app that will read integers from an input file name Number.txt that will consist of one integer. Determine which numbers are even and which are odd. Write the even numbers to a file named Even.txt and the odd numbers to a file named Odd.txt. Number.txt 20 39 45 12 31 62 10 11 21 73 14 42 55 86 109...

  • programming in Microsoft visual studio. Write a C++ program for the following algorithm. Compile, run, and...

    programming in Microsoft visual studio. Write a C++ program for the following algorithm. Compile, run, and verify the result by choosing some test data. Prompt user to write X1 value in double Read X1 Prompt user to write X2 value in double Read X2 Prompt user to write Y1 value in double Read Y1 Prompt user to write Y2 value in double Read Y2 Compute the lengths of the two sides of the right triangle generated by the two points...

  • Using Microsoft Visual Studio 2017 C++, write a C++ program to calculate to analyze the data...

    Using Microsoft Visual Studio 2017 C++, write a C++ program to calculate to analyze the data from the number of visitors to Sleeping Bear Dunes in Michigan in 2015. Requirements Read the data from the Months.txt and Visitors.txt files. The text files are provided for you to download. The data was obtained from the National Park Service website. Design the program so the user enters a menu item and the following is displayed Display the chart below Totals and display...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT