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
vodka [1.7K]
2 years ago
14

What is a shell programming? Write a shell program to get the following details from the student: NAME, AGE, USN and GENDER. Out

put all the details to the terminal and also display message whether the student is eligible to vote or not
Computers and Technology
1 answer:
Leya [2.2K]2 years ago
3 0

Shell programs are computer programs designed to run on the Unix/Linux shell

The shell program where comments are used to explain each line is as follows:

#This gets input for NAME

read NAME  

#This gets input for AGE

read AGE  

#This gets input for USN

read USN

#This gets input for GENDER

read GENDER

#This prints the name

echo "Name: $NAME"

#This prints the age

echo "Age: AGE"

#This prints the usn

echo "USN: USN"

#This prints the gender

echo "GENDER: $GENDER"

#The following if condition determines, if the user is eligible to vote or not

if [ $USN -gt 50 ] then

echo "You are not eligible"

else

echo "You are eligible"

Read more about computer programs at:

brainly.com/question/13795586

You might be interested in
Write a program that prints the following 45 pairs of numbers:
sattari [20]

Answer:

  • Code is in JAVA language. As there is no user input the logic is straightforward.
  • Below is the code along with a detailed explanation of the logic.
  • The class name is Print main save as file as the main class.

Explanation:

Program:-

public class Main{

public static void main(String args[]){

/* There are two for loops...

* First for loop runs from i=1 to i=9

* Second for loop runs from j=1 to j=i.

*

*/

for(int i=1;i<=9;i++){

for(int j=1;j<=i;j++){ // j loop runs from j=1 to j=i

/*Prints I and j next to each other*/

System.out.println(i+""+j);

}//for loop of j ends here

}// for loop of I ends here

}

}

6 0
3 years ago
Write a Java program that prompts the user to enter integer values for the sides of a triangle and then displays the values and
satela [25.4K]

Answer:

import java.util.Scanner;

public class triangle {

       public static void main (String [] args) {

           int sideOne, sideTwo, sideThree;

           Scanner in = new Scanner (System.in);

           System.out.println("Enter the first side of the triangle");

           sideOne = in.nextInt();

           System.out.println("Enter the secon side of the triangle");

           sideTwo = in.nextInt();

           System.out.println("Enter the third side of the triangle");

           sideThree = in.nextInt();

           if ( sideOne<=0||sideTwo<=0|| sideThree<=0){

               System.out.println(" The Values enter are "+sideOne+ "," +sideThree+ ","+sideThree+ " These values don't make a valid triangle");

           }

           else if ((sideOne + sideTwo> sideThree) || (sideOne+sideThree > sideTwo) || (sideThree+sideTwo > sideOne))

           {

               System.out.println ("The triangle is Valid");

           }

           else {

               System.out.println(" The Values enter are "+sideOne+ "," +sideTwo+ ","+sideThree+ " These values don't make a valid triangle");

           }

       }

Explanation:

for a Triangle to be Valid one of the three sides of the triangle must greater than the other two sides.  The code above enforces this condition using an if statement in combination with the Or Operator

The following conditions where enforced

side one, side two and side three != 0

Side One + Side Three > Side Two

Side Three + Side Two> Side One

Side Two + Side One > Side Three

7 0
3 years ago
Encoding a video format and then decoding it during playback is one of the functions of MPEG-4 and H.264 file players. MPEG-4 an
Sergio [31]

Answer:

video codecs

Explanation:

A video converter can be defined as a software application or program designed to avail end users the ability to convert video files from one digital format to another. After the conversion of the video is complete, the components of the video format such as aspect ratio (e.g 16:9, 4:3 etc), resolution (e.g 1028×760, 640×320), audio and video codecs (e.g mp3, mp4, H.264 etc), the bit rate are also converted depending on the choice of the user.

Encoding a video format and then decoding it during playback is one of the functions of MPEG-4 and H.264 file players. MPEG-4 and H.264 are known as video codecs.

7 0
3 years ago
Read 2 more answers
Suppose you are an ISP that owns a / 22 IPv4 address block. Can you accommodate requests from six customers who need addresses f
lisabon 2012 [21]

Answer:

It is not possible.

Explanation:

In this example, we need to accommodate 473 computers for six clients that are 473 IP addresses.

For this request just we have /22 IPv4 address blocks, this mean

22 red bits 11111111111111111111110000000000 <--- 10 host bits

We must increase red bits to 25, we need these 3 bits to create 6 sub red, in this case, 2^3 = 8 sub red.

Why did we ask 3 bits? Because if we ask only 2, 2^2 = 4, and we need 6 sub red.

25 red bits 11111111111111111111111110000000 7 host bits

In this case, we need more than 260 computers, but just we have 7 bits, this means.

2^7 = 128 and just one customer needs 260, for that is impossible.

7 0
3 years ago
) What does sampling mean?
lubasha [3.4K]
In terms of music taking one song and incorporating it into your own song
6 0
3 years ago
Other questions:
  • You can leave out the ____ statements in a switch structure.
    15·1 answer
  • If you think the user might enter 24.9, you should create a float variable. true or false
    9·1 answer
  • What kind of video are you are able to watch by downloading it from the Internet?
    10·1 answer
  • Which of the following identifies the patterns used for each data series in a chart?
    13·1 answer
  • A difference between crt monitors and flat-panel displays is that most flat-panel displays use digital signals to display images
    8·1 answer
  • Write and test a Python program to find and print the largest number in a set of real (floating point) numbers. The program shou
    5·1 answer
  • While (e &lt; 10):<br> print (c)
    10·1 answer
  • In news writing, which is bigger , a topic or a angle
    10·1 answer
  • A program that allows employees to choose their starting and ending times, as long as they are at work during a specified core p
    8·1 answer
  • Please help me excel questions!​
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!