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
vagabundo [1.1K]
2 years ago
7

What are three ways that functions can be useful when you are writing programs

Computers and Technology
1 answer:
grin007 [14]2 years ago
5 0

Answer:

Reduces the overall complexity of your program

Allows you to easily call a function from different parts of your program after defining it.

Helps break a problem into logical chunks

Explanation:

You might be interested in
Special numeric has three digits and holds a property that it is exactly equal to summation of cubes from each digit. For exampl
Vera_Pavlovna [14]

Answer:

The following code is written in C programming language:

#include <stdio.h>     //header file

 

int main()       //main method

{

   int n, t, digit1, digit2, digit3;      // set integer variables

    // print message

   printf("Print all Special integer numbers between 100 and 999:\n");

   n = 100;      //initialize value in variable "n"    

   while (n <= 999)      //set while loop

   {

       digit1 = n - ((n / 10) * 10);

       digit2 = (n / 10) - ((n / 100) * 10);

       digit3 = (n / 100) - ((n / 1000) * 10);

       t = (digit1 * digit1 * digit1) + (digit2 * digit2 * digit2) + (digit3 * digit3 * digit3);

       if (t == n)      //set if statement

       {

           printf("\n Special integer number is: %d", t);     //print an output

       }

       n++;

   }

}

Output:

Print all Special integer numbers between 100 and 999:

Special integer number is: 153

Special integer number is: 370

Special integer number is: 371

Special integer number is: 407

Explanation:

Here, we set the header file "stdio.h".

Then, we define integer type "main()" function.

Then, we set five integer type variable "n", "t", "digit1", "digit2", "digit3".

Then, we the print message by print() method and initialize a value to variable "n" to 100.

Then, we set the while loop which starts from 100 and stops at 999 and if the condition is true than code inside the loop is execute either loop is terminated.

Then, we set the if statement and pass the condition, if the condition is true the output would be print either if the condition is false the if statement is terminated.

8 0
3 years ago
A file extension of. Xlsm indicates what type of workbook.
Vitek1552 [10]

We have that the .xlsm <em>Format </em>is used to save Excel Macro-Enabled Workbook file

<h3>Formats</h3>

Generally file are saved in different formats for easy sorting and application on the operating system.

For instance if a music file is renamed and stored in a different format say .exe the audio file wont be recognised as an audio file and hence refuse to play.

e.g

  • .exe for a windows appication
  • ,mp3 for an audio file
  • .xlsm here is used to save Excel Macro-Enabled Workbook file

For more information on Excel visit

brainly.com/question/19295387

8 0
2 years ago
Im bored anyone up for a convo? lets talk.. =D
aleksandrvk [35]

Answer:

ok im fine with dat <3

6 0
3 years ago
Read 2 more answers
Write a program that asks the user for the number of males and the number of females registered in a class. The program should d
Bond [772]

Answer:

import java.util.Scanner;

public class PercentagePopulation {

public static void main(String[] args) {

 // 1. Create an object of the Scanner class

 // This will allow for user's inputs

 Scanner input = new Scanner(System.in);

 // 2. Create a prompt asking the user to enter the number of males

 System.out.println("Please enter the number of males");

 // 3. Receive the number entered by the user and store in an int

 // variable called  number_of_males.

 int number_of_males = input.nextInt();

 // 4. Create a prompt asking the user to enter the number of

               // females

 System.out.println("Please enter the number of females");

 // 5. Receive the number entered by the user and store in an int

 // variable  called, number_of_females

 int number_of_females = input.nextInt();

 // 6. Find the sum of the number of males and females

 // Store the result in an int variable called total.

 int total = number_of_males + number_of_females;

 // 7. Find the percentage of males by using the appropriate

 // formula.  Do a type-casting to allow for division in floating point

               // representation by prepending the number_of_males by (double)

 double percentagemales = (double) number_of_males / total * 100.0;

 // 8. Find the percentage of females by using the appropriate

 // formula.  Do a type casting to allow for division in floating point

               // representation by prepending the number_of_males by (double)

 double percentagefemales = (double) number_of_females / total * 100.0;

 // 9. Print out the results

 System.out.println("Percentage males : " + percentagemales + "%");

 System.out.println("Percentage females : " + percentagefemales + "%");

}

}

Explanation:

Please go through the comments in the code to give an explanation of the program. The source code file has also been added to this response. Please download it and go through it.

Download java
4 0
3 years ago
What's is flow chart?
TEA [102]

Answer: A flowchart is a graphical representation of decisions and their results mapped out in individual shapes.

Explanation:

These shapes were first developed by Herman Goldstine and John von Neumann in the 1940s.

Flowcharts can provide a step-by-step diagram for mapping out complex situations, such as programming code or troubleshooting problems with a computer.

4 0
3 years ago
Other questions:
  • A software program that allows a programmer to type in code. modern versions usually make it easy to format the code on the scre
    13·1 answer
  • You have implemented a network where hosts are assigned specific roles, such as for file sharing and printing. Other hosts acces
    7·1 answer
  • Create a Python program as described below and save it in a file named bool. You should use IDLE or similar environment to creat
    15·1 answer
  • Using a database of precomputed hashes from sequentially calculated passwords called a(n) __________, an attacker can simply loo
    14·1 answer
  • The ____ function displays the highest value in a range.
    15·2 answers
  • To drive defensively means taking proactive measures to avoid accident situations regardless of their potential causes.
    6·2 answers
  • Working with text in presentation programs is similar to using text in other applications
    9·2 answers
  • Which of the following best describes professional behavior in the IT field?
    6·1 answer
  • Check ALL of the correct answers.
    13·1 answer
  • When you login to your blogging account. The first screen with all controls, tools and functions is called .... Select one: a. D
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!