<span>Pinhole cameras were one of the most sophisticated devices of the period, it made tasks much easier it basically worked exactly like the human eye and is something just like tracing.
Hope it helps! :)</span>
Answer:Following is the C program:-
#include <stdio.h>
int fun()//function fun of return type int and it returns value 6.
{
return 6;
}
int main() {
int a, b;
a = 10;
b = a + fun();//adds 6 to a.
printf("With the function call on the right, ");
printf("\n%d ",b);//printing b..
return 0;
}
Output:-
With the function call on the right,
16
Explanation:
The function fun return the value 6 so it adds 6 to a and stores the result in b.
Rubbing two sticks together will cause friction
Answer:
import java.io.*;
import java.util.Scanner;
class divide {
public static void main (String[] args) {
Scanner num=new Scanner(System.in);//scanner object.
int userNum=num.nextInt();
while(userNum>1)//while loop.
{
userNum/=2;//dividing the userNum.
System.out.print(userNum+" ");//printing the userNum.
}
}
}
Input:-
40
Output:-
20 10 5 2 1
Input:-
2
Output:-
1
Input:-
0
Output:-
No Output
Input:-
-1
Output:-
No Output.
Explanation:
In the program While loop is used.In the while loop it divides the userNum by 2 in each iteration and prints the value of userNum.The inputs and corresponding outputs are written in the answer.