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
agasfer [191]
3 years ago
15

If you know batch coding, can you see if there is anything wrong with this script, or if you can make any suggestions to modify

the code?
thanks

@echo off
cls
color df
title Website Opener
echo type in "website" to go to open website ( you dont need to include the www. Or you can type "program" instead to open a program)
set /p a=
if %a%== program goto start_pro
if %a%== website goto website
) Else (
exit

:website
cls
echo okay! what website do you want to open?
set /p a=Website:
start www.%a%
exit



:start_pro
cls
title Open A Program
echo what is the program you want to open?
set /p a=
if exist %a% then
if not exist %a% exit
start %a%
Computers and Technology
1 answer:
zzz [600]3 years ago
8 0
There isn't an opening and closing parentheses for the else statement. PM me. I know a lot of batch...
You might be interested in
What are the conditions for using still photos in a video program
ozzi
It is the basic way to Photoshop in a video
4 0
3 years ago
Consider the following method, inCommon, which takes two Integer ArrayList parameters. The method returns true if the same integ
sp2606 [1]

Answer:

The answer is "Option b".

Explanation:

In the given code, a static method "inCommon" is declared, that accepts two array lists in its parameter, and inside the method two for loop is used, in which a conditional statement used, that checks element of array list a is equal to the element of array list b. If the condition is true it will return the value true, and if the condition is not true, it will return a false value. In this, the second loop is not used because j>0 so will never check the element of the first element.

6 0
3 years ago
How would you reduce or minimize the size of a "file"?
beks73 [17]
The answer is D Compress

I hope this helps
6 0
3 years ago
In this scenario, two friends are eating dinner at a restaurant. The bill comes in the amount of 47.28 dollars. The friends deci
pickupchik [31]

Answer:

The java program for the given scenario is as follows.

import java.util.*;

import java.lang.*;

public class Main

{

   //variables for bill and tip declared and initialized

   static double bill=47.28, tip=0.15;

   //variables for total bill and share declared

   static double total, share1;

public static void main(String[] args) {

    double total_tip= (bill*tip);

    //total bill computed

    total = bill + total_tip;

    //share of each friend computed

    share1 = total/2;

    System.out.printf("Each person needs to pay: $%.2f", share1);  

}

}

Explanation:

1. The variables to hold the bill and tip percent are declared as double and initialized with the given values.

static double bill=47.28, tip=0.15;

2. The variables to hold the values of total bill amount and total tip are declared as double.

3. All the variables are declared outside main() and at class level, hence declared as static.

4. Inside main(), the values of total tip, total bill and share of each person are computed as shown.

double total_tip= (bill*tip);

total = bill + total_tip;

share1 = total/2;

5. The share of each person is displayed to the user. The value is displayed with only two decimal places which is assured by %.2f format modifier. The number of decimal places required can be changed by changing the number, i.e. 2. This format is used with printf() and not with println() method.

System.out.printf("Each person needs to pay: $%.2f", share1);  

6. The program is not designed to take any user input.

7. The program can be tested for any value of bill and tip percent.

8. The whole code is put inside a class since java is a purely object-oriented language.

9. Only variables can be declared outside method, the logic is put inside a method in a purely object-oriented language.

10. As shown, the logic is put inside the main() method and only variables are declared outside the method.

11. Due to simplicity, the program consists of only one class.

12. The output is attached.

5 0
3 years ago
Read 2 more answers
How to unlock your iphone when you forgot the password?.
Lena [83]

Answer:

go to customer service

Explanation:

5 0
2 years ago
Other questions:
  • Following a company on likedin is most similar to
    8·1 answer
  • A company has developed a business-critical system for its core automation process with a software vendor. Which of the followin
    12·1 answer
  • Fundamental types of data, such as strings, integers, and real numbers, are known as
    5·1 answer
  • Are one of the greatest features of Photoshop that allow nondestructive editing of images.
    6·1 answer
  • Boardman College maintains two files—one for Sociology majors and another for Anthropology majors. Each file contains students'
    5·1 answer
  • Copyright applies to work at the time it was produced, written, and developed. True or False?
    10·2 answers
  • The {blank} view is the working window of a presentation.
    15·2 answers
  • Decision support systems help managers use structured data to identify problems and find solutions to business-related problems.
    10·1 answer
  • When can designers use rapid application development?
    8·1 answer
  • Given three floating-point numbers x, y, and z, output x to the power of y, x to the power of (y to the power of z), the absolut
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!