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
kozerog [31]
3 years ago
7

Given an int variable k that has already been declared, write some code that uses a for loop to print a single line consisting o

f 97 asterisks. Use no variables other than k.
Computers and Technology
1 answer:
yawa3891 [41]3 years ago
6 0

Answer:

The program to the given statement can be defined as follows:

Program:

//header file

#include <stdio.h> //defining header file

int main() //defining main method

{

int k; //defining integer variable k

for (k=1;k<=97;k++) //defining for loop

{

printf("*"); //print value asterisks

}

return 0;

}

Output:

*************************************************************************************************

Explanation:

Firstly, the headers file is included in the above C-language, and then the main method is described and all computations are performed with this method, which can be described as follows:

  • Inside the main method, an integer variable k is declared.
  • In the next line, the for loop is declared, which uses the variable k, which starts from 1 and ends when the value of k is less than equal to 97, inside the loop, it will print asterisks.
You might be interested in
How would you describe the difference between a syntax error and a logic error?
Ugo [173]

Answer:

hii

Explanation

syntax error:  a syntax error is an error in the syntax of a sequence of characters or tokens that is intended to be written in compile-time. A program will not compile until all syntax errors are corrected.

logic error:  logic error is a bug in a program that causes it to operate incorrectly, but not to terminate abnormally. A logic error produces unintended or undesired output or other behaviour, although it may not immediately be recognized as such.

6 0
3 years ago
Read 2 more answers
Who is affected by electronuc theft of a song ?
Sonbull [250]
I would have to say the artist.
simply because the artist or publisher does not receive any income on their product. 
7 0
3 years ago
Read 2 more answers
What is the most important job of a web server?
attashe74 [19]

Answer:

Provide requested web pages to clients; the other tasks listed there are secondary to that.

6 0
2 years ago
Read 2 more answers
What paper should I use for technical drawing?
Vitek1552 [10]

Answer:

classic A4 format, and therefore for 210 x 297 mm sheets

7 0
3 years ago
Which troubleshooting tool enables you to connect to a user's remote computer, view and interact with the user's screen, and cha
DaniilM [7]
That would be Remote assistance.
6 0
3 years ago
Other questions:
  • What best compares potrait and landscape orientations
    6·1 answer
  • Name three types of data stored on a computer’s hard disk
    11·1 answer
  • The Springfork Amateur Golf Club has a tournament every weekend. The club president
    7·1 answer
  • ________ uses the signals transmitted over the phone to access the database, retrieve account information and input data. Group
    11·1 answer
  • Zach would like to reuse a spreadsheet that he created last year. However, he will need to delete the contents of several cells.
    5·1 answer
  • HELP 99PTS If Answered
    12·2 answers
  • What function returns a line and moves the file pointer to the next line?
    9·1 answer
  • Emma lives in Pennsylvania, what climate does she live in?
    7·1 answer
  • How did you generate a random number for the user to guess?
    9·1 answer
  • Which type of mic is durable, versatile and does not rely on power?
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!