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
Vera_Pavlovna [14]
3 years ago
7

Write a program named as reverse.c that reads a message, then prints the reversal of the message. The output of the program shou

ld look like t
Computers and Technology
1 answer:
AfilCa [17]3 years ago
7 0

Answer:

Written in C:

#include <stdio.h>

#include <strings.h>

int main(){

   char userinput[100];

   printf("Enter a message: ");

   scanf("%s",&userinput);

   int lent = strlen(userinput);

   for (int i=lent-1; i>=0; i--)

     printf("%c",userinput[i]);

   return 0;    

}

Explanation:

This line declares a string variable

   char userinput[100];

This line prompts user for input

   printf("Enter a message: ");

This line gets user input

   scanf("%s",&userinput);

This line calculates the length of user input

   int lent = strlen(userinput);

This iterates through the characters of user input

   for (int i=lent-1; i>=0; i--)

This prints the characters in reverse

     printf("%c",userinput[i]);

You might be interested in
Which term refers to actions that you would typically perform on a computer to revive it if it functions in an unexpected manner
andriy [413]
There are many answers to this question. The first step is normally a reboot, second, I would check witch task or service is taking up all the CPU cycles and check the system and error logs. The list goes on... I'm not sure how detailed you want to get.
5 0
4 years ago
Read 2 more answers
I have been working on this python program for a hour now, and I am trying to figure out what I an doing wrong in the loop. I ha
Alona [7]

Answer:

The correct loop is as follows:

for year in range(starting_tuitionYear, ending_tuitionYear, increment):

   tuition = startingTuition + rate * startingTuition

   startingTuition = tuition

   print('Tuition for the year of ' + str(year)+ ' is ' + str(tuition));

Explanation:

Required

The correction to the attached program

Some variables are not needed; so, I've removed the redundant variables.

The main error in the program is in the loop;

After the tuition for each year has been calculated, the startTuition of the next year must be set to the current tuition

<em>See attachment for complete program</em>

7 0
3 years ago
Which option describes wearable technology? A. the incorporation of technology into objects we use regularly B. rugged technolog
vichka [17]

The correct answer is

A.  the incorporation of technology into objects we use regularly

#Platogang

8 0
3 years ago
WIN
Delicious77 [7]
The correct answer is D
6 0
3 years ago
Read 2 more answers
Answer quick plzzz I only have 2 hours
Nana76 [90]

Answer:

option 2

Explanation:

8 0
3 years ago
Read 2 more answers
Other questions:
  • . When you have multiple graphics positioned on a page, you can _______________ them so that they are a single graphic instead o
    9·1 answer
  • What is the name of the feature that can be enabled on slower-speed WAN links to prevent a large data transfer from affecting th
    10·1 answer
  • Vlad is the leader of a group; he receives most of the messages from the group members, and he provides most of the information
    6·1 answer
  • 7. Which innovation in video games do you think has been most significant? Include at least one way that innovation affects the
    6·1 answer
  • What are rules that enforce basic and fundamental information-based constraints?
    12·1 answer
  • Alguien me puede ayudar a arreglar mis auriculares que mi perro rompió en el conector
    5·1 answer
  • mapa mental con la explicación de que medios de comunicación y redes sociales intervienen en la construcción de tu identidad​
    10·1 answer
  • Please help! I tried this by myself. But I am not sure if this is right.
    8·2 answers
  • How to make a 'Sign in with replit' button in replit (Node.js) will make brainliest
    12·2 answers
  • Cho dãy A gồm N số nguyên a1,...aN. Hãy đếm tất cả các số âm hoặc không chia hết cho 5 trong dãy
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!