what is an example of iteration in c
Answers
⠀⠀ ⠀ ⠀⠀ ⠀
ɪᴛᴇʀᴀᴛɪᴏɴ ɪs ᴡʜᴇɴ ᴛʜᴇ sᴀᴍᴇ ᴘʀᴏᴄᴇᴅᴜʀᴇ ɪs ʀᴇᴘᴇᴀᴛᴇᴅ ᴍᴜʟᴛɪᴘʟᴇ ᴛɪᴍᴇs. sᴏᴍᴇ ᴇxᴀᴍᴘʟᴇs ᴡᴇʀᴇ ʟᴏɴɢ ᴅɪᴠɪsɪᴏɴ, ᴛʜᴇ ғɪʙᴏɴᴀᴄᴄɪ ɴᴜᴍʙᴇʀs, ᴘʀɪᴍᴇ ɴᴜᴍʙᴇʀs, ᴀɴᴅ ᴛʜᴇ ᴄᴀʟᴄᴜʟᴀᴛᴏʀ ɢᴀᴍᴇ. sᴏᴍᴇ ᴏғ ᴛʜᴇsᴇ ᴜsᴇᴅ ʀᴇᴄᴜʀsɪᴏɴ ᴀs ᴡᴇʟʟ, ʙᴜᴛ ɴᴏᴛ ᴀʟʟ ᴏғ ᴛʜᴇᴍ. ʙᴜɴᴄʜ ᴏғ sᴜᴄᴄᴇssɪᴠᴇ ɪɴᴛᴇɢᴇʀs, ᴏʀ ʀᴇᴘᴇᴀᴛ ᴀ ᴘʀᴏᴄᴇᴅᴜʀᴇ ᴀ ɢɪᴠᴇɴ ɴᴜᴍʙᴇʀ ᴏғ ᴛɪᴍᴇs.
⠀⠀ ⠀ ⠀⠀ ⠀
⠀⠀ ⠀ ⠀⠀ ⠀
⠀⠀ ⠀ ⠀⠀ ⠀
⠀⠀ ⠀ ⠀⠀ ⠀
⠀⠀ ⠀ ⠀⠀ ⠀
⠀⠀ ⠀ ⠀⠀ ⠀
Hope its help uhh :)
Answer:
The correct answer is for, while and do-while.
Explanation:
Iteration is a process in c language which deals with providing a set of instructions and statement which executes continuously for a number of times specifically until the conditional gets its acception.
An iteration statements it more commonly known as loops.
It follows a repetition process by using the process of loop instructions. A loop maintains three concepts that is known as initialization, test expression and increment or decrement.
There are three kinds of loops namely:
1. For loop:
It uses three kinds of loops such as, initiation, test expression and update expression is used in for loop.
The syntax for For loop is:
For (initialization; test expression; update expression)
{
//body of loop
}
2. While loop:
The while loop repeats a statement if until it become true and if it become false it stops execution.
The syntax for while loop is:
while(condition) {
statement(s);
}
3. Do- while loop:
The do-while loop the condition will always appear at the end of a loop, and it will look like the statement will be executed before anything gets tested.
The syntax for do-while loop is:
do {
statement(s);
} while( condition );
#SPJ3