1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Nitella [24]
4 years ago
14

Write a program that inputs the following information from the user, using the Win32 Read-Console function: first name, last nam

e, age, phone number. Redisplay the same information with labels and attractive formating, using Win32 WriteConsule function.
Computers and Technology
1 answer:
Jobisdone [24]4 years ago
4 0

Answer:

Following are program using c#

using System;

class detail

{

 static void Main() // main function

 {

     string first_name,last_name, number1; // variable declaration

     int age1;                             //variable declaration

Console.WriteLine("Enter the First Name  ");

first_name = Console.ReadLine(); // read input by win32

Console.WriteLine("Enter the Last Name  ");

last_name = Console.ReadLine(); // read input by win32

Console.WriteLine("Enter the Age  ");

age1 = Int32.Parse(Console.ReadLine()); // read input by win32

Console.WriteLine("Enter the Phone Number  ");

number1 = Console.ReadLine(); // read input by win32

Console.WriteLine("Following are the data which are  entered  ");

Console.WriteLine("First Name  :"+first_name); // display data

Console.WriteLine("Last Name   :"+last_name); // display data

Console.WriteLine("Age         :"+age1);//display data

Console.WriteLine("Phone Number:"+number1); // display data

 }

}

Explanation:

In this program we have declared  first_name,last_name, number1 variable as the string type and age1 as integer type after that we are taking input from user by win32 Read console i.e Console.ReadLine()  function and finally printed the same  information.

Output:

Enter the First Name

san

Enter the Last Name

lan

Enter the Age

45

Enter the Phone Number

9045454545

Following are the data which are  entered

First Name       :san

Last Name        :lan

Age                   :45

Phone Number :9045454545

You might be interested in
For businesses and organizations under recent compliance laws, data classification standards typically include private, confiden
Anon25 [30]

Answer:

True is the correct answer for the above question.

Explanation:

  • To secure the data is the first rule for any organization because when the data is lost or unsecured the whole system can have the problem.
  • If any person wants to hack the system or any organization then they first choose to hack the data of the system.
  • So there is a Hundred of law in the US taken by the US government at the Federal trade commission act to secure the data of the organization.
  • The above question also states the same which is defined above. Hence It is a true statement.
6 0
3 years ago
In what ways do you think the media should function in a democratic society?
insens350 [35]

Answer:

i think it should slow down

Explanation:

i think this because people are always on social media so they should put down their devices and interact with others and sometimes they are violent on their devices so it would be better if people did stay off their devices for a little bit.

7 0
4 years ago
1) Prompt the user to enter two words and a number, storing each into separate variables. Then, output those three values on a s
masya89 [10]

Answer:

import java.util.Scanner;

public class TestClock {

   public static void main(String[] args) {

 Scanner in = new Scanner (System.in);

       System.out.print("Enter favorite color:");

 String word1 = in.next();

       System.out.print("Enter pet's name:");

 String word2 = in.next();

       System.out.print("Enter a number:");

 int num = in.nextInt();

       System.out.println("you entered: "+word1+" "+word2+" "+num);

   }

}

Explanation:

Using Java Programming language

  1. Import the Scanner class
  2. create an object of the scanner class
  3. Prompt user to enter the values for the variables (word1, word2, num)
  4. Use String concatenation in System.out.println to display the output as required by the question.

7 0
3 years ago
Assume the variable myWord references a string. Write a statement that uses a slicing
givi [52]

Answer:

"myWord[-5:]"

Explanation:

So whenever you slice a string, the syntax in python is expressed as:

string[a:b:c]

where a=start index (this is included in the sliced string)

b = end index (this is excluded from the sliced string)

c = increment

If any of these are included, they are set to default values, where a=0, b=len(string), and c=1.

The increment isn't necessary here, and it's just so you know the syntax a bit more

Anyways, I'm assuming when the question asks to display "the last 5 characters in the string" it means in order? e.g "abcdefghijk" -> "ghijk" and not "abcdefghijk" -> "kjihg"

The last piece of information to know is what a negative index represents.

For example if I have the piece of code

"

string = "hello world"

print(string[-1])

"

This will output "d", and the negative 1 represents the last letter. If you did -2, it would output the 2nd to last letter and so on.

So to print the last 5 characters, we simply use the -5 as the starting index.  

"

string = "hello world"

print(string[-5:])

"

This will print "world" or in other words, the last 5 letters. The reason for this is because the -5 in the first spot means the starting index is the 5th to last letter, and when you have the : after the -5, this is the way of telling python you're slicing the string, and not indexing 1 character. You don't need to include another value after that, because it will default to the last index of the string, or more specifically the last index + 1, since the last index is still included.

So the last thing to know, is that if the string isn't greater than 5 characters, it just prints the entire string, and no errors are raised. You can test this out your self as well. So whenever you have a string that's less than 5 characters the entire string is outputted.

3 0
2 years ago
A personal identification number (PIN) that opens a certain lock consists of a sequence of 3 different digits from 0 through 9,
Elan Coil [88]

Answer:

<u>720</u> possible PIN can be generated.

Explanation:

To calculate different number of orders of digits to create password and PIN, we calculate permutation.

Permutation is a term that means the number of methods or ways in which different numbers, alphabets, characters and objects can arranged or organized. To calculate the permutation following formula will be used:

nPr = n!/(n-r)!

there P is permutation, n is number of digits that need to be organize, r is the size of subset (Number of digits a password contains)

So in question we need to calculate

P=?

where

n= 10   (0-9 means total 10 digits)

r= 3     (PIN Consist of three digits)

So by using formula

10P3 = 10!/(10-3)!

        =10!/7!

        = 10x9x8x7!/7!

        = 10x9x8

        = 720

7 0
3 years ago
Other questions:
  • Jose calls you at the help desk because he is having a problem logging on to his laptop computer. After several unsuccessful att
    14·1 answer
  • Which of the Arts, A/V Technology, and Communication career cluster pathways are involved with producing a product for an audien
    8·2 answers
  • Ray has to type an invoice using the QWERTY keyboard. Along with letters and numbers, he also has to insert the dollar sign. Whi
    13·1 answer
  • Write a program that produces a Caesar cipher of a given message string. A Caesar cipher is formed by rotating each letter of a
    14·1 answer
  • Why are high-quality transformers wound with large diameter wire?
    8·1 answer
  • • In your response, please include some examples of the three different types of storage.
    11·2 answers
  • Pride Group of Companies is making tremendous profits in different categories of electronic goods. The group of managers have to
    12·1 answer
  • C:/Users/Documents/resume.docx Where is the "resume" document located in this file structure?
    12·1 answer
  • Use the drop-down menus to explain how to locate the Consolidate dialog box.
    6·1 answer
  • Your job is to choose a data structure to implement polynomials whose coefficients are positive integers, such as 17x^4+4x^3+0x^
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!