without a single input is it possible to write an algorithm
a) yes
b) no
c) maybe
d) none of the above
Answers
Yes, It is possible to write an algorithm without a single input.
Explanation :
Example 1:
The best example for this statement is "Hello World" program.
In a simple, basic, Hello World program, you won't take any input, but all you print down is a statement which states 'HelloWorld!'.
- Start
- Print statement stating some information.
- End.
You can add as many as print statements here.
Example 2:
Making computations directly by taking the values statically.
Like, directly writing a statement print(2+3) which results 5. Here, you do not take any value as an input from the user, instead you directly take values in the program itself.
- Start
- Printing the vale, by taking values directly (Statically) and performing the action upon them.
- End
In Example 1 and 2 types, everytime you run the program, you will egt the same result.
Example 3:
Using the functions like rand(). This built-in function is used to generate a pseudo-random integral number, all by itself.
So, on giving a range (statically) and placing it in print statement gives you an integer within the range, randomly.
- Start
- Import the library or module.
- Print a statement with the random function defining the range stically within it.
- End.
Everytime you run the program, it returns a different value within the range provided.
Learn more :
1. algorithm and flowchart of the program to read n integers ,store them in array and find their sum and average.
https://brainly.in/question/15394177
2. Program to perform Arithmetic operations using function.
brainly.in/question/18905944