This assignment requires you to write a program to analyze a web page HTML file. Your program will read one character at a time from the file specifying the web page, count various attributes in the code for the page, and print a report to the console window giving information about the coding of the page.
Note that a search engine like Google uses at least one technique along similar lines. To calculate how popular (frequently visited or cited) a web page is, one technique is to look at as many other worldwide web pages as possible which are relevant, and count how many links the world's web pages contain back to the target page.
Learning Objectives
To utilize looping structures for the first time in a C++ program
To develop more sophisticated control structures using a combination of selection and looping
To read data from an input file
To gain more experience using manipulators to format output in C++
To consider examples of very simple hypertext markup language (HTML)
Use UNIX commands to obtain the text data files and be able to read from them
Problem Statement
Your program will analyze a few things about the way in which a web page is encoded. The program will ask the user for the name of a file containing a web page description. This input file must be stored in the correct folder with your program files, as discussed in class, and it must be encoded using hypertext markup language, or HTML. The analysis requires that you find the values of the following items for the page:
number of lines (every line ends with the EOLN marker; there will be an EOLN in front of the EOF)
number of tags (includes links and comments)
number of links
number of comments in the file
number of characters in the file (note that blanks and EOLNs do count)
number of characters inside tags
percentage of characters which occur inside tags, out of the total
Here is an example of a very simple HTML file:

Course Web Page
This course is about programming in C++.
Click here You may assume that the HTML files you must analyze use a very limited subset of basic HTML, which includes only the following "special" items: tag always starts with '<' and ends with > link always starts with " comment always starts with "" You may assume that a less-than symbol (<) ALWAYS indicates the start of a tag. A tag in HTML denotes an item that is not displayed on the web page, and often gives instructions to the web browser. For example, indicates that the next item is the overall title of the document, and indicates the end of that section. In tags, both upper and lowercase letters can be used. Note on links and comments: to identify a link, you may just look for an 'a' or 'A' which occurs just after a '<'. To identify a comment, you may just look for a '!' which follows just after a '' (that is, you do not have to check for the two hyphens). You may assume that these are the only HTML language elements you need to recognize, and that the HTML files you process contain absolutely no HTML syntax errors. Note: it is both good style because readability is increased, and convenient, to declare named constants for characters that are meaningful, for example const char TAG OPEN = ' Sample Input Files Program input is to be read from a text file. Your program must ask the user for interactive input of the file name. You can declare a variable to store the file name and read the user's response Miscellaneous Tips and Information You should not read the file more than once to perform the analysis. Reading the file more than once is very inefficient. The simplest, most reliable and consistent way to check for an end of file condition on a loop is by checking for the fail state, as shown in lectures. The eof function is not as reliable or consistent and is simply deemed "flaky" by many programmers as it can behave inconsistently for different input files and on different platforms. You may use only while loops on this project if you wish; you are not required to choose amongst while, do while and/or for loops until project 4 and all projects thereafter. Do not create any functions other than main() for this program. Do not use data structures such as arrays. You may only have ONE return statement and NO exit statements in your code. You may only use break statements inside a switch statement in the manner demonstrated in class; do not use break or continue statements inside loops. #include // used for interactive console I/O #include // used to format output #include // used to retrieve data from file #include // used to convert data to uppercase to simplify comparisons #include 11 for string class functions int main() { 1 //constants for analysing HTML attributes const char EOLN = '\n'; const char COMMENT_MARK = '!'; const char LINK='A'; //constants to format the output const int PAGEWIDTH = 70; const char UNDERLINE = '='; const char SPACE = const int PCT_WIDTH = 5; const int PCT_PRECISION = 2;

Answers

Answer 1

Answer:

bro it is a question what is this

Explanation:

please follow me


Related Questions

What is a piece of information sent to a function

Answers

Answer:

the information sent to a function is the 'input'.

or maybe not hehe

When a variable is stored in memory, it is associated with an address. To obtain the address of a variable, the & operator can be used. For example, &a gets the memory address of variable a. Let's try some examples. Write a C program addressOfScalar.c by inserting the code below in the main function

Answers

Solution :

#include<stdio.h>

int main()

{

char charvar='\0';

printf("address of charvar = %p\n",(void*)(&charvar));

printf("address of charvar -1 = %p\n",(void*)(&charvar-1));

printf("address of charvar +1 = %p\n",(void*)(&charvar+1));

int intvar=1;

printf("address of intvar = %p\n",(void*)(&intvar));

printf("address of intvar -1 = %p\n",(void*)(&intvar-1));

printf("address of intvar +1 = %p\n",(void*)(&intvar+1));

}

Select the items that you may see on a Windows desktop.
Shortcuts to frequently used programs
System tray
Recycle Bin
Taskbar
O Database
Icons
O Quick Launch

Answers

Answer:

You may see:

The taskbar

The startmenu

Program icons within the taskbar

Shortcuts

Documents

Folders

Media files

Text files

The Recycle Bin

and so on...

Your friend is using Internet Explorer to send and receive email using her Hotmail account. She received a Word document attached to an email message from a business associate. She double-clicked the Word attachment and spent a couple of hours editing it, saving the document as she worked. Then she closed the document. But where’s the document now? When she later needed it, she searched her email account online and the Documents folder on her hard drive, but she could not find the document. She called you in a panic asking you to help her find her lost document.

Answers

Answer:

Temporary Internet Files folder

Explanation:

Assuming that your friend is using the Microsoft Windows 10 operating system, then this document would have gotten saved in the Temporary Internet Files folder within the operating system. This folder can be located within the following address in the operating system

C:\Users\[username]\AppData\Local\Microsoft\Windows\INetCache

Navigating to this address would help you find the folder and inside that should be the Microsoft Word document that you have used in your Internet Explorer Browser. This folder is where all browser files get saved when they are not explicitly downloaded to a specific folder but are still used within the browser.

For this lab you will do 2 things:


Solve the problem in an algorithm

Code it in Python

Problem:


Cookie Calories


A bag of cookies holds 40 cookies. The calorie information on the bag claims that there are 10 "servings" in the bag and that a serving equals 300 calories. Write a program that asks the user to input how many cookies he or she ate and the reports how many total calories were consumed.


*You MUST use constants to represent the number of cookies in the bag, number of servings, and number of calories per serving. Remember to put constants in all caps!


Make sure to declare and initialize all variables before using them!


Then you can do the math using those constants to find the number of calories in each cookie.


Make this program your own by personalizing the introduction and output.




Sample Output:


WELCOME TO THE CALORIE COUNTER!!

Answers

Answer:

Here is the Python program:

COOKIES_PER_BAG = 40 #sets constant value for bag of cookies

SERVINGS_PER_BAG = 10 #sets constant value for serving in bag

CALORIES_PER_SERVING = 300 #sets constant value servings per bag

cookies = int(input("How many cookies did you eat? ")) #prompts user to input how many cookies he or she ate

totalCalories = cookies * (CALORIES_PER_SERVING / (COOKIES_PER_BAG / SERVINGS_PER_BAG)); #computes total calories consumed by user

print("Total calories consumed:",totalCalories) #displays the computed value of totalCalories consumed

Explanation:

The algorithm is:

StartDeclare constants COOKIES_PER_BAG, SERVINGS_PER_BAG and CALORIES_PER_SERVINGSet COOKIES_PER_BAG to 40Set SERVINGS_PER_BAG to 10Set CALORIES_PER_SERVING to 300Input cookiesCalculate totalCalories:                                                                                                                       totalCalories ← cookies * (CALORIES_PER_SERVING / (COOKIES_PER_BAG / SERVINGS_PER_BAG))Display totalCalories

I will explain the program with an example:

Lets say user enters 5 as cookies he or she ate so

cookies = 5

Now total calories are computed as:

totalCalories = cookies * (CALORIES_PER_SERVING / (COOKIES_PER_BAG / SERVINGS_PER_BAG));  

This becomes:

totalCalories = 5 * (300/40/10)

totalCalories = 5 * (300/4)

totalCalories = 5 * 75

totalCalories = 375

The screenshot of program along with its output is attached.

To write a letter using Word Online, which document layout should you choose? ASAP PLZ!

Answers

Traditional... See image below

Answer: new blank document

Explanation: trust is key

Complete the do-while loop to output from 0 to the value of countLimit using printVal. Assume the user will only input a positive number. For example, if countLimit is 5 the output will be:
0
1
2
3
4
5
import java.util.Scanner;
public class CountToLimit {
public static void main (String [] args) {
Scanner scnr = new Scanner(System.in);
int countLimit = 0;
int printVal = 0;
// Get user input
countLimit = scnr.nextInt();
printVal = 0;
do {
System.out.print(printVal + " ");
printVal = printVal + 1;
} while ( /* Your solution goes here */ );
System.out.println("");
return;
}
}

Answers

Answer:

Replace

while ( /* Your solution goes here */ );

with

while (printVal <=countLimit );

Explanation:

while (printVal <=countLimit );

This checks if the printVal is less than or equal to countLimit.

While this statement is true, the program will continue printing the required output

See attachment for complete program

Write a program that takes as input a number of kilometers and prints the corresponding number of nautical miles.

Use the following approximations:

A kilometer represents 1/10,000 of the distance between the North Pole and the equator.
There are 90 degrees, containing 60 minutes of arc each, between the North Pole and the equator.
A nautical mile is 1 minute of an arc.

An example of the program input and output is shown below:

Enter the number of kilometers: 100
The number of nautical miles is 54

Answers

In python:

kilos = int(input("Enter the number of kilometers: "))

print(f"The number of nautical miles is {round(kilos/1.852,2)}")

I hope this helps!

For an input of 100 kilometers, the program displays "The number of nautical miles is 54.00."

To convert kilometers to nautical miles based on the given approximations.

Here are the simple steps to write the code:

1. Define a function called km_to_nautical_miles that takes the number of kilometers as input.

2. Multiply the number of kilometers by the conversion factor [tex](90 / (10000 \times 60))[/tex] to get the equivalent number of nautical miles.

3. Return the calculated value of nautical miles from the function.

4. Prompt the user to enter the number of kilometers they want to convert.

5. Read the user's input and store it in a variable called kilometers.

6. Call the km_to_nautical_miles function, passing the kilometers variable as an argument, to perform the conversion.

7. Store the calculated value of nautical miles in a variable called nautical_miles.

8. Display the result to the user using the print function, formatting the output string as desired.

Now the codes are:

def km_to_nautical_miles(km):

   nautical_miles = (km * 90) / (10000 * 60)

   return nautical_miles

kilometers = float(input("Enter the number of kilometers: "))

nautical_miles = km_to_nautical_miles(kilometers)

print(f"The number of nautical miles is {nautical_miles:.2f}.")

The output of this program is:

The result is displayed to the user as "The number of nautical miles is 54.00."

To learn more about programming visit:

https://brainly.com/question/14368396

#SPJ4

Write this program using an IDE. Comment and style the code according to CS 200 Style Guide. Submit the source code files (.java) below. Make sure your source files are encoded in UTF-8. Some strange compiler errors are due to the text encoding not being correct. This lab asks you to create a text game Rock Paper Scissors. The rule of the game: There are two players in this game and they can choose Rock, Paper, or Scissors each time. Rock beats Scissors, Paper beats Rock and Scissors beat Paper. Your program needs to prompt a user to choose an action (Rock, Paper, or Scissors) and save their choice. The program randomly chooses an action (Hint: use .nextInt() to generate random integers in the range of [1,3]. 1 indicates Rock, 2 indicates Paper and 3 indicates Scissors.) Then the program determines who is the winner.
When input is R Please select one of [R/P/S]: You chose: Rock I chose: Scissors Rock beats scissors - you win! If the user enters the lowercase, your program can still recognize. When input is p Output should be Please select one of [R/P/S]: You chose: Paper I chose: Scissors Scissors beat paper - you lose! If the user enters invalid input, the program will give an error message and set the default choice as Rock When input is v Output should be Please select one of [R/P/S]: Invalid choice! Defaulting to Rock. I chose: Scissors Rock beats scissors - you win! If the user has the same result as the computer, your program should output: A Tie!

Answers

Answer:

import java.util.Scanner; //to accept input from user

import java.util.Random; //to generate random numbers

public class Main { //class name

   public static void main(String[] args) { //main method

       System.out.println("Please select one of [R/P/S]: "); //prompts user to select a choice

       Scanner scanner = new Scanner(System.in); //reads input choice

       String playerChoice = scanner.next().toUpperCase().replace(" ", ""); //converts the choice to upper case and stores it in playerChoice

       if (playerChoice.equals("R") || playerChoice.equals("P") || playerChoice.equals("S")) { // if player choice is a valid choice

           results(CompChoice(), playerChoice);    // calls method to compute result of game

   } else { //if player enters invalid choice

      System.out.println("\nInvalid choice!");     }    }    //error message

   

   private static String CompChoice() {  //to generate computer choice  

           Random generator = new Random();  //to generate random numbers

           int comp = generator.nextInt(3)+1; //generates 3 random numbers

           String compChoice = "";  //to store computer choice

           switch (comp) { //checks the random number for corresponding computer choice

           case 1: //1 is for Rock

               compChoice = "Rock"; //sets compChoice to Rock

               break;

            case 2: //random  number 2 is for Paper

               compChoice = "Paper"; //sets compChoice to Paper

               break;

            case 3: //random  number 3 is for Scissors

               compChoice = "Scissors"; //sets compChoice to  Scissors

               break;         }        

       return compChoice;      } //returns computer choice

   

   private static void results(String compChoice, String playerChoice) { //method to compute result

        if(playerChoice.equals("R")) //if playerChoice is equal to R

       { playerChoice = "Rock"; //stores Rock to playerChoice

        System.out.println("You chose: Rock");} //displays player choice

        else if(playerChoice.equals("P")) //if playerChoice is equal to P

       { playerChoice = "Paper";        //stores Paper to playerChoice

               System.out.println("You chose: Paper");} //displays player choice

         else  //if playerChoice is equal to S

        { playerChoice="Scissors"; //stores Scissors to playerChoice

          System.out.println("You chose: Scissors"); }  //displays player choice

 System.out.println("I chose: " + compChoice); //displays computer choice

       if (compChoice.equals(playerChoice)) { //if compChoice is equal to playerChoice          

          System.out.println("a tie!"); //its a tie if computer and player choice is the same

          System.exit(1);  }//exits on tie    

        boolean youWin = false; //variable to check if player wins      

       if (compChoice.equals("Rock")) { //if computer choice is Rock

          if (playerChoice.equals("Paper")) //if player choice is Paper

          {System.out.println("Paper beats Rock.");

              youWin = true;} //player wins to youWin is set to true

        else if(playerChoice.equals("Scissors"))  { //if player choice is Scissors

              System.out.println("Rock beats scissors.");

              youWin = false;}     }   //player loses to youWin is set to false

       

       if (compChoice.equals("Paper")) { //if computer choice is Paper

          if (playerChoice.equals("Rock")) //if player choice is Rock

          {System.out.println("Paper beats Rock.");

              youWin = false;}  //player loses to youWin is set to false

         else if(playerChoice.equals("Scissors")) { //if player choice is Scissors

              System.out.println("Scissors beats Paper.");

              youWin = true;} }  //player wins to youWin is set to true    

       

       if (compChoice.equals("Scissors")) { //if computer choice is Scissors

          if (playerChoice.equals("Rock")) //if player choice is Rock

          {System.out.println("Rock beats Scissors.");

              youWin = true;} //player wins to youWin is set to true

         else if(playerChoice.equals("Paper")) { //if player choice is Paper

              System.out.println("Scissors beats Paper.");

              youWin = false;} }  //player loses to youWin is set to false

     

            if (youWin) //if player wins means if youWin is true

                System.out.println("you win!"); //declare player to be winner

           else //if player loses means if youWin is false

                System.out.println("you lose!");     } } //declare player to lose

                       

Explanation:

The program is well explained in the comments attache with each line of program. The program has three methods. One is the main method to start the game and prompts user to enter a choice and converts the user input choice to upper case. One is CompChoice method that generates three random numbers and uses switch statement to set 1 for Rock, 2 for Paper and 3 for Scissors . One method is results that takes computer choice and player choice as parameters to decide the winner. It uses if else statements to check if choice of user wins from choice of computer or vice versa. It uses a boolean variable youWin which is set to true when player choice beats computer choice otherwise is set to false. At the end if youWin is true then the player is declared winner otherwise not. The screenshot of the program output is attached.

If a command was taking a large amount of system resources (memory and processing) and this was causing some system performance issues, what could a system administrator do to solve the problem?

Answers

Answer:

They can delete some tabs so less resources go to RAM

Explanation:

It depends on how many cores you have, your clock speed etc, when you have a lot of tabs open then your computer sends some files to RAM to be stored for a little while whilst it clears up some of its files. So therefore, delete/move some files so less files can be transported to RAM.

Write a function add_spaces(s) that takes an arbitrary string s as input and uses a loop to form and return the string formed by adding a space between each pair of adjacent characters in the string. You may assume that s is not empty.

Answers

Solution:

def add_spaces(s):

   result = ""

   for i in range(len(s)-1):

       result += (s[i]+" ")

   result += s[-1]

   return result

# Testing  

print(add_spaces('hello'))

print(add_spaces('hangman'))

print(add_spaces('x'))

And the output will be

hello

hangman

x

Process finished with exit code 0

what is a computer ?it types​

Answers

Answer:

A computer is a digital device that you can do things on such as play games, research something, do homework.

Explanation:

Answer:

A computer can be best described as an electronic device that works under the control of information stored in it's memory.

There are also types of computers which are;

Microcomputers/personal computerMini computersMainframe computerssuper computers

Ms. Myers commented that _____ she slept in at the hotel was better than _____ she slept in at home.

Answers

The bed/ the bed is the answer

Which of the following best describes open-source code software?
O A. a type of software that is open to the public and can be modified
B. a type of software that is free to download, but cannot be modified
C. a type of software that is locked, but can be modified
D. a type of software that has already been modified

Answers

Answer:

A. a type of software that is open to the public and can be modified.

Explanation:

Open-source refers to anything that is released under a license in which the original owner grants others the right to change, use, and distribute the material for any purpose.

Open-source code software is described as a type of software that is open to the public and can be modified. The correct option is A.

What is open-source code?

Open-source software is computer software that is distributed under a licence that allows users to use, study, change, and distribute the software and its source code to anyone and for any purpose.

Open-source software can be created collaboratively and publicly. Open-source refers to anything that is released under a licence that allows others to change, use, and distribute the material for any purpose.

Therefore, open-source code software is defined as software that is freely available to the public and can be modified. A is the correct answer.

To know more about open-source code follow

https://brainly.com/question/15039221

#SPJ6

The SAP ERP ____ software module plans and schedules production and records actual production activities.A) project systemB) production planningC) quality managementD) asset management

Answers

Answer:

A) project system

Explanation:

The SAP ERP is a planning software that incorporates the business function of an organization. The business function are Operations, Financials,  Human Capital Management and Corporate Services.

SAP Project System is a tool (functional module) that is integrated with the SAP Enterprise Resource Planning (SAP ERP) system allowing users to direct funds and resources as well as controlling each stage of the project. It also allow users to define start and end date of the project.

Write a program that reads a list of words. Then, the program outputs those words and their frequencies. The input begins with an integer indicating the number of words that follow. Assume that the list will always contain fewer than 20 words.
Ex: If the input is:
5 hey hi Mark hi mark
the output is:
hey 1
hi 2
Mark 1
hi 2
mark 1
Hint: Use two arrays, one array for the strings and one array for the frequencies.

Answers

Answer:

Here is the JAVA program:

import java.util.Scanner;   //to accept input from user

public class Main {  //class name

  public static void main(String[] args) {  //start of main method

      Scanner input = new Scanner(System.in);  //creates Scanner object

      int integer = input.nextInt();  //declares and reads the integer indicating the number of words

      String stringArray[] = new String[integer]; //creates array to hold strings

      for (int i = 0; i < integer; i++) {  //iterates through the array

          stringArray[i] = input.next();         }  //reads strings

      int frequency[] = new int[integer];  //creates array for frequencies

      int count;         //declares variable to count frequency of each word

      for (int i = 0; i < frequency.length; i++) {  //iterates through the frequency array

          count = 0;  //initializes count to 0

          for (int j = 0; j < frequency.length; j++) {  //iterates through array

              if (stringArray[i].equals(stringArray[j])) {  //if element at ith index of stringArray is equal to element at jth index of stringArray

                  count++;                 }            }  //adds 1 to the count

          frequency[i] = count;      }  //adds count to ith index of frequency array

      for (int i = 0; i < stringArray.length; i++) {  //iterates through the array

          System.out.println(stringArray[i] + " " + frequency[i]);         }    }    } //displays each word in stringArray and its corresponding frequency in frequency array

Explanation:

I will explain the program with an example:

let integer = 3

for (int i = 0; i < integer; i++) this loop is used to read input strings into stringArray.

At first iteration:

i = 0

0<3

stringArray[i] = input.next(); this reads a word and stores it to ith index of stringArray. Lets say user enters the string "hey" so hey is stored in stringArray[0]

i++ becomes i = 1

At second iteration:

i = 1

1<3

stringArray[i] = input.next(); this reads a word and stores it to ith index of stringArray. Lets say user enters the string "hi" so hi is stored in stringArray[1]

i++ becomes i = 2

At third iteration:

i = 2

2<3

stringArray[i] = input.next(); this reads a word and stores it to ith index of stringArray. Lets say user enters the string "hi" so hi is stored in stringArray[2]

i++ becomes i = 3

Now the loop breaks as i<integers evaluates to false.

Next the outer loop for (int i = 0; i < frequency.length; i++)

and inner loop for (int j = 0; j < frequency.length; j++)  iterate through the array and if condition if (stringArray[i].equals(stringArray[j])) checks if any of the words at specified indices is equal. This is used in order to check if any word in the list comes more than once. So if any word occurs more than once in the array, then its count is increased each time and the count value is stored in frequency[] array to store the count/frequency of each word in the stringArray. Since hey occurs once so its count is set to 1 and hi occurs twice so its frequency is set to 2. So the output of the entire program is:

hey 1

hi 2

hi 2

The screenshot of the program along with its output with the given example in question is attached.

CJ is developing a new website blogging about cutting-edge technologies for people with special needs. He wants to make the site accessible and user friendly.
CJ knows that some of the visitors who frequent his website will use screen readers. To allow these users to bypass the navigation, he will use a skip link, He wants to position the skip link on the right but first he must use the ____ property.
a) display
b) right
c) left
d) nav

Answers

Answer:

The answer is "Option c".

Explanation:

It is an internal page reference which, whilst also completely new pages, allow navigating around the current page. They are largely used only for bypassing and 'skipping' across redundant web page content by voice command users, that's why the CJ would use a skip link to enable those users to bypass specific navigation, and he also wants to put this link on the right, but first, he needs to use the left property.

What questions would you ask an employer at a job interview?

Answers

Answer:

8 Questions You Should Absolutely Ask An Interviewer

QUESTION #1: What do the day-to-day responsibilities of the role look like? ...

QUESTION #2: What are the company's values? ...

QUESTION #3: What's your favorite part about working at the company? ...

QUESTION #4: What does success look like in this position, and how do you measure it?

Explanation:

I hope this answer is Wright ,So please mark as brainlist answers

Order the steps for accessing the junk email options in outlook 2016

Answers

Answer:

1 Select a message

2 Locate the delete group on the ribbon

3 Click the junk button

4 Select junk email options

5 Choose one of the protection levels

Explanation:  

Correct on Edg 2021

Answer:

In this Order:

Select Message, Locate delete group, click the junk, choose one of the...

Explanation:

Edg 2021 just took test

Language: C
Introduction
For this assignment you will write an encoder and a decoder for a modified "book cipher." A book cipher uses a document or book as the cipher key, and the cipher itself uses numbers that reference the words within the text. For example, one of the Beale ciphers used an edition of The Declaration of Independence as the cipher key. The cipher you will write will use a pair of numbers corresponding to each letter in the text. The first number denotes the position of a word in the key text (starting at 0), and the second number denotes the position of the letter in the word (also starting at 0). For instance, given the following key text (the numbers correspond to the index of the first word in the line):
[0] 'Twas brillig, and the slithy toves Did gyre and gimble in the wabe;
[13] All mimsy were the borogoves, And the mome raths outgrabe.
[23] "Beware the Jabberwock, my son! The jaws that bite, the claws that catch!
[36] Beware the Jubjub bird, and shun The frumious Bandersnatch!"
[45] He took his vorpal sword in hand: Long time the manxome foe he sought—
The word "computer" can be encoded with the following pairs of numbers:
35,0 catch
5,1 toves
42,3 frumious
48,3 vorpal
22,1 outgrabe
34,3 that
23,5 Beware
7,2 gyre

Answers

The .cpp code is avaiable bellow

Code:

#include <stdio.h>

#include <string.h>

int main()

{

    char **kW;

    char *fN;

    int nW = 0;

    kW = malloc(5000 * sizeof(char*));

    for (int i = 0; i<5000; i++)

    {

         kW[i] = (char *)malloc(15);

    }

    fN = (char*)malloc(25);

    int choice;

    while (1)

    {

         printf("1) File text to use as cipher\n");

         printf("2) Make a cipher with the input text file and save result as output file\n");

         printf("3) Decode existing cipher\n");

         printf("4) Exit.\n");

         printf("Enter choice: ");

         scanf("%d", &choice);

         if (choice == 1)

         {

             nW = readFile(kW, fN);

         }

         else if (choice == 2)

         {

             encode(kW, fN, nW);

         }

         else

         {

             Exit();

         }

         printf("\n");

    }

    return 0;

}

int readFile(char** words, char *fN)

{

    FILE *read;

    printf("Enter the name of a cipher text file:");

    scanf("%s", fN);

    read = fopen(fN, "r");

    if (read == NULL)

    {

         puts("Error: Couldn't open file");

         fN = NULL;

         return;

    }

    char line[1000];

    int word = 0;

    while (fgets(line, sizeof line, read) != NULL)

    {

         int i = 0;

         int j = 0;

         while (line[i] != '\0')

         {

             if (line[i] != ' ')

             {

                  if (line[i] >= 65 && line[i] <= 90)

                  {

                       words[word][j] = line[i]; +32;

                  }

                  else

                  {

                       words[word][j] = line[i];

                  }

                  j++;

             }

             else

             {

                  words[word][j] = '\n';

                  j = 0;

                  word++;

             }

             i++;

         }

         words[word][j] = '\n';

         word++;

    }

    return word;

}

void encode(char** words, char *fN, int nwords)

{

    char line[50];

    char result[100];

    if (strcmp(fN, "") == 0)

    {

         nwords = readFile(words, fN);

    }

    getchar();

    printf("Enter a secret message(and press enter): ");

    gets(line);    

    int i = 0, j = 0;

    int w = 0, k = 0;

    while (line[i] != '\0')

    {        

         if (line[i] >= 65 && line[i] <= 90)

         {

             line[i] = line[i] + 32;

         }

         w = 0;

         int found = 0;

         while (w<nwords)

         {

             j = 0;

             while (words[w][j] != '\0')

             {

                  if (line[i] == words[w][j])

                  {

                       printf("%c -> %d,%d \n", line[i], w, j);

                       found = 1;

                       break;

                  }

                  j++;

             }

             if (found == 1)

                  break;

             w++;

         }

         i++;

    }

    result[k] = '\n';

}

void Exit()

{

    exit(0);

}

C Write a program whose input is two integers, and whose output is the first integer and subsequent increments of 10 as long as the value is less than or equal to the second integer. Ex: If the input is: -15 30 the output is:

Answers

Answer:

Written in C Language

#include <stdio.h>

int main() {

   int num1, num2;

   printf("Enter two integers: ");

   scanf("%d", &num1);

   scanf("%d", &num2);

   if(num1 <= num2){

   for(int i = num1; i<= num2; i+=10)

   {

       printf("%d",i);   printf(" ");

   }    

   }

   return 0;

}

Explanation:

This line declares two integer variables

  int num1, num2;

This line prompts user for input of the two numbers

   printf("Enter two integers: ");

The next two lines get integer input from the user

   scanf("%d", &num1);

   scanf("%d", &num2);

The following if statement checks if num1 is less than or equal to num2

   if(num1 <= num2){

The following iteration prints from num1 to num2 at an increment of 10

   for(int i = num1; i<= num2; i+=10)

   {

       printf("%d",i);   printf(" ");

   }    

To what does the term "versioning information" refer?
O the version of software that a system is running
the version of your monitor
the number of versions of a virus you have
the version of your PC

Answers

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The versioning information refers to the version of the software that a system is running. Versioning of software is the creation and managing of multiple releases of software that all have the same general functionality but improved, modified, upgraded, and customized.

so the correct answer to this question is version information refers to the version of a software that a system is running.  

Other options are not correct, because the term version mostly used for software, web application, and web, API services.

The best term use for a version of monitor and PC is model number and also noted that virus detecting software can have version number but the virus itself doesn't have any version number.

So all other options of this question are incorrect except the first option that is:- Versioning information refers to the version of the software that a system is running.

Reading for comprehension requires _____ reading?

1. passive
2. active
3. slow
4. fast

Answers

Answer:

IT is ACTIVE

Explanation: I took the quiz

Answer:

not sure sorry

Explanation:

Write a program that takes a three digit number (input) and prints its ones, tens and hundreds digits on separate lines

Answers

In python:

number = input("Enter your number ")

i = 0

while i < len(number):

   print(number[i])

   i += 1

The SQL SELECT command is capable of executing ____.

a. only relational Select operations
b. only relational Select and Project operations but not relational Join operations
c. relational Select, Project, and Join operations individually but not in combination
d. relational Select, Project, and Join operations individually or in combination
e. None of the above.

Answers

Answer:

d. relational Select, Project, and Join operations individually or in combination

Explanation:

SQL is short for structured query language. The SQL Select command allows the user to obtain data from a database. After the data is computed, the output is in a tabular form which is known as the result set.

All the queries begin with the Select command. The column and the table names are clearly noted in the instructions. This command can also execute projects and join several operations in combination or individually.

Write a function, maxRadius, to find an index of a Planet with the largest radius in the array. The function should

Answers

Answer:

Follows are the code to this question:

#include<iostream>//defining header file

#include<string>//defining header file

using namespace std;

const double Pi =3.141592653589793238463;//defining double constant variable

class Planet  

{

private:

string planet_name;//defining string variable

double radius;//defining double variable

public:

Planet()//defining default constructor

{

this->planet_name="";//use this keyword to hold value

this->radius=0.0;//use this keyword to hold value

}

Planet(string name, double radius)//defining parameterized constructor  

{

this->planet_name = name;//use this keyword to hold value

this->radius=radius;//use this keyword to hold value

}

string getName() const//defining getName method  

{

return this->planet_name;//use return keyword for return string value

}

double getRadius() const//defining getRadius method  

{

return this->radius;//use return keyword for return radius value

}

double getVolume() const //defining getVolume method

{

return 4*radius*radius*radius*Pi/3;////use return keyword for return volume value

}

};

int maxRadius(Planet* planets, int s)//defining a method maxRadius that accept two parameter

{

double maxRadius=0;//defining double variable

int index_of_max_radius=-1;//defining integer variable

for(int index=0; index<s; index++)//defining for loop for calculate index of radius  

{

if(planets[index].getRadius()>maxRadius)//defining if block to check radius

{

maxRadius = planets[index].getRadius();//use maxRadius to hold value

index_of_max_radius=index;//hold index value

}

}

return index_of_max_radius;//return index value

}

int main()//defining main method

{

Planet planets[5];//defining array as class name

planets[0] = Planet("On A Cob Planet",1234);//use array to assign value  

planets[1] = Planet("Bird World",4321);//use array to assign value

int idx = maxRadius(planets,2);//defining integer variable call method maxRadius

cout<<planets[idx].getName()<<endl;//print value by calling getName method

cout<<planets[idx].getRadius()<<endl;//print value by calling getRadius method

cout<<planets[idx].getVolume()<<endl;//print value by calling getVolume method

}

Output:

Bird World

4321

3.37941e+11

Explanation:

please find the complete question in the attached file:

In the above-program code, a double constant variable "Pi" is defined that holds a value, in the next step, a class "Planet" is defined, in the class a default and parameter constructor that is defined that hold values.

In the next step, a get method is used that return value, that is "planet_name, radius, and volume".

In the next step, a method "maxRadius" is defined that accepts two-parameter and calculate the index value, in the main method class type array is defined, and use an array to hold value and defined "idx" to call "maxRadius" method and use print method to call get method.  

g Write a function called price_of_rocks. It has no parameters. In a while loop, get a rock type and a weight from the user. Keep a running total of the price for all requested rocks. Repeat until the user wants to quit. Quartz crystals cost $23 per pound. Garnets cost $160 per pound. Meteorite costs $15.50 per gram. Assume the user enters weights in the units as above. Return the total price of all of the material. For this discussion, you should first write pseudocode for how you would solve this problem (reference pseudocode.py in the Week 7 Coding Tutorials section for an example). Then write the code for how you would tackle this function. Please submit a Python file called rocks_discussion.py that defines the function (code) and calls it in main().

Answers

Answer:

The pseudocode:

FUNCTION price_of_rocks():

  SET total = 0

  while True:

      INPUT rock_type

      INPUT weight

      if rock_type is "Quartz crystals":

         SET total += weight * 23

      elif rock_type is "Garnets":

         SET total += weight * 160

      elif rock_type is "Meteorite":

         SET total += weight * 15.50

       

       INPUT choice

       if choice is "n":

           break

 

   RETURN total

END FUNCTION

The code:

def price_of_rocks():

   total = 0

   while True:

       rock_type = input("Enter rock type: ")

       weight = float(input("Enter weight: "))

       

       if rock_type == "Quartz crystals":

           total += weight * 23

       elif rock_type == "Garnets":

           total += weight * 160

       elif rock_type == "Meteorite":

           total += weight * 15.50

           

       choice = input("Continue? (y/n) ")

       if choice == "n":

           break

   

   return total

print(price_of_rocks())

Explanation:

Create a function named price_of_rocks that does not take any parameters

Initialize the total as 0

Create an indefinite while loop. Inside the loop:

Ask the user to enter the rock_type and weight

Check the rock_type. If it is "Quartz crystals", multiply weight by 23 and add it to the total (cumulative sum). If it is "Garnets", multiply weight by 160 and add it to the total (cumulative sum). If it is "Meteorite", multiply weight by 15.50 and add it to the total (cumulative sum).

Then, ask the user to continue or not. If s/he enters "n", stop the loop.

At the end of function return the total

In the main, call the price_of_rocks and print

Which of the following is true about strings?
They cannot be stored to a variable
An input (unless otherwise specified) will be stored as a string
They do not let the user type in letters, numbers and words
They are used for arithmetic calculations

Answers

Answer:

Your answer is option C, or the third option.

They do not let the user type in letters, numbers, and words.

Explanation:

Strings are defined as a sequence of characters literal, constant, or variable. These sequences are like an array of data or list of code that represents a structure. Formally in a language, this includes a finite(limited) set of symbols derived from an alphabet. These characters are generallu given a maximum of one byte of data each character. In longer languages like japanese, chinese, or korean, they exceed the 256 character limit of an 8 bit byte per character encoding because of the complexity of the logogram(character representing a morpheme((which is the simpliest morphological(form or structure) unit of language with meaning)) character with 8 bit (1 byte, these are units of data) refers to cpu(central processing unit) which is the main part of a computer that processes instructions, and sends signals.

I don‘t know how to solve a crossword puzzle. Please help me!!!

Answers

Across would be words like: HELLO.
Vertically would be words like: H

E
Y

Which syntax error in programming is unlikely to be highlighted by a compiler or an interpreter? a variable name misspelling a missing space a comma in place of a period a missing closing quotation mark

Answers

Answer:

A variable name misspelling.

Explanation:

A Syntax Error that occurs as the result of a variable name that is misspelled will not be highlighted.

On edg 2020

Answer:

A variable name misspelling.

Ex planation:

A

Other Questions
Given: 2n=m+h, h=n+m; prove n=2m Llena el espacio en blanco.Los deportes Open the keypad se hacen en el agua. Who are the neanderthals? 250 words essay On TESSIE from the lottery, her perspective( 1st person point of view) please i need this really bad. Please have good detail What were some rationales for womens suffrage? Some rationales against it? Wyatt invested $1,600 in an account paying an interest rate of 52% compoundedannually. Joshua invested $1,600 in an account paying an interest rate of 47%compounded quarterly. After 17 years, how much more money would Wyatt have inhis account than Joshua, to the nearest dollar? A line contains the point (2 , 1) and has a slope of -2. What is the equation of the line?please help I got this wrong can someone, please help me with this. Choose the best Spanish translation.Do you need some papers?a. Necesitas unos papeles?b. Necesitas los papeles?c. Necesitas unas papeles?d. Necesitas unos papels? P, mano...Hoje acordei m brocox. A parada que a mina no caiu na minha onda porque t na pindaba! T grilado e no sei como conquistar aquela novinha. Morou?"Qual tipo de expressao informal foi usada nesse texto. Help! Whats the answer Which are characteristics of Sportsmans Paradise? Check all that apply. The area is known for its excellent ocean fishing. There are many rolling hills, forests, and lakes. Many people who settled here were Anglo-Saxon or Celtic.The region is located in the southern part of the state. The region is known for its many recreational activities. Explain the three major causes that contribute to mental health disorders. Was there a year when the wolves outnumbered the deer? The average customer for a certain utility company pays $120 per month for utilities. The company plans to decrease utility bills by 3% each year for the next five years. Which of the following can be used to determine the total amount an average customer will pay for utilities during the next five years? an arithmetic series a geometric series a series that is neither arithmetic nor geometric a series that is both arithmetic and geometric an arithmetic seriesa geometric seriesa series that is neither arithmetic nor geometrica series that is both arithmetic and geometric Three colorless solutions in test tubes, with no labels, are in a test tube rack on the laboratory bench. Lying beside the tests tubes are three labels : 0.10 M Na2CO3, 0.10 M HCL, and 0.10 M KOH. You are to place the labels on the test tubes using only the three solutions present. Here are your tests: A few drops of the solutions from test tube 1 added to a similar volume of the solution in test tube 2 produces no visible reaction but the solution becomes warm. A few drops of the solution from test tube 1 added to a similar volume of the solution in test tube 3 produces carbon dioxide gas. Identify the labels for test tubes 1, 2, and 3 One-half of a number x is equal to the sum of two andthe same number & . Find the value of x. The average number of seeds in a package of cucumber seed is 95. The numbof seeds in the package can vary by eight. What are the maximum andminimum number of seeds that could be in a package?Select the correct equation and solutions that match this situation. Maya has 120 caramel apples to sell. Each caramel apple is covered with one topping. If 2/5 of the caramel apples are covered in sprinkles,how many caramel apples will have sprinkles? What chemical bond is responsible for the existence of the sugar-phosphate backbone of DNA