+ 3
int num=1;int number;while(num<=5){cin>>number;num++;} what is the process of int number ;
14 ответов
+ 4
it just always while this for loop is activated ( in this case 5 times ) wants the user to input a number
+ 2
Mo D'souza dudu.. we are put int number because int means integer numbers. eg; .....-5,-4,-3,-2,-1,0,1,2,3,4,5,........,
if we putting float number then .....-7.00,-6.00,-5.00,-4.00,-3.00,-2.00,-1.00,0,1.00,2.00,3.00,4.00,..........
+ 1
"number" acts as a variable and every variable is to be declared before using it.
+ 1
If you look num is one variable and number is a separate variable. They have to be separate because the tasks use them for different things.
+ 1
first it will ask for the number thn it will display that number 5 times it will print until the number we enter will be greater thn 5 :)
+ 1
printing whatever you input it as 5 time
0
nothing
0
then y we are add int number ; line
0
this is a varible declared to input the number you wish...
0
سلام
0
let 's try run the code. u wil found out my answered.
0
Fill in the blanks to declare a function named "triple" taking an int parameter and returning its value times 3:
int triple (int num) {
int y;
y = num * 3;
return y;
}
- 2
output of program is
1
2
3
4
5
- 3
y pls like my answer