Answer:
Please find the code in the attached file.
Output:
Please find the attached file.
Explanation:
In this code a "num" variable is declared that use while loop that check num value greater than equal to 0.
Inside the loop we input the "num" value from the user-end and use if the value is positive it will define a for loop that calculates the quotient value as integer part, and use the asterisks to print the value.
If input value is negative it print a message that is "Goodbye".
Please find the code link: https://onlinegdb.com/7MN5dYPch2
Yes, you should have a firewall on your home network prevent hackers from getting in your network and causing damage to your devices or files. You should be able to put up a firewall with your Windows computer on the home menu>control panel>Firewall and that should work.
This is for Python
numbers = [7, 3, 6, 9, 0]
print(numbers.sort())
Output: [0, 3, 6, 7, 9]
numbers = [7, 3, 6, 9, 0]
print(numbers.sort(reverse = True))
Output: [9, 7, 6, 3, 0]
Answer:
You can answer this very easily by considering which of the circumstances affect the end user and which affect the developer:
1) Didn't use comments in the code
- affects developers
2) User complaints about language used in the program
- affects users
3) The variables have meaningless names
- affects developers
4) The program should have used a loop
- affects developers
5) The numeric results are incorrect
- affects users
Your answers then are 2 and 5, spoken languages and incorrect output will very much affect the user experience.
Answer:
The program to calculate factor can be given as:
Program:
#include <stdio.h> //include header file
int main() //defining main function
{
int a,i; //defining integer variable
printf("Enter any number: "); //print message
scanf("%d",&a); //input value from user end
for(i=1;i<=a;i++) //loop for calculate factor values
{
if(a%i==0) //define condition for factor
{
printf("%d\n",i); //print values
}
}
return 0;
}
Output:
Enter any number: 15
1
3
5
15
Explanation:
In the above C language program the header file is include that provide the use of basic function, in the next line the main method is defined, inside this method two integer variable "a and i" is defined in which variable a is used to take value from user end and variable i is used in loop and conditional statement.
- In the next step, for loop is declare, that start from 1 and end with value of variable a, inside a loop, if block is used that checks (a%i==0), in this if variable i value modeler value equal to 0.
- The loop will use the print function that prints variable "i" element in a new line, which is the factor the values.