Answer:
import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
while(true) {
System.out.print("Enter an integer (0 to exit): ");
int num = scan.nextInt();
if (num == 0) break;
if (num%3 == 0 && num%5 == 0) {
System.out.printf("%d is divisable by both 3 and 5.\n", num);
}
else if (num%3 == 0 && num%5 != 0) {
System.out.printf("%d is divisable by 3 but not by 5.\n", num);
}
else if (num%3 != 0 && num%5 == 0) {
System.out.printf("%d is divisable by 5 but not by 3.\n", num);
} else {
System.out.printf("%d is not divisable by 3 or 5.\n", num);
}
}
scan.close();
}
}
Answer:
1. navigation 2.create 3.forms 4.all the columns in the table
Explanation:
Answer:
When it is in frictional force or in the action of movement varies the speed and if it will stop
Explanation:
If a object is in action a out side force is needed to make it start or stop
Answer:
output
Explanation:
it can be seen and touched
Answer:
Written using C++
#include <iostream>
#include <vector>
using namespace std;
int main() {
vector<int> fibb;
int n1 = 0;
int n2 = 1;
int temp;
for (int nm= 0; nm < 50;nm++) {
fibb.push_back(n1);
temp = n1 + n2;
n1 = n2;
n2 = temp;
}
for (int nm= 0; nm < 50;nm++) {
{
cout<<fibb.at(nm)<<" ";
}
return 0;
}
Explanation:
#include <iostream>
#include <vector>
using namespace std;
int main() {
This line declares the vector as integer
vector<int> fibb;
This line initializes the first term to 0
int n1 = 0;
This line initializes the second term to 1
int n2 = 1;
This line declares a temporary variable
int temp;
The following iteration populates the vector with first 50 Fibonacci series
for (int nm= 0; nm < 50;nm++) {
This push an entry into the vector
fibb.push_back(n1);
The following generate the next Fibonacci element
<em> temp = n1 + n2;</em>
<em> n1 = n2;</em>
n2 = temp;
}
The following iteration prints the generated series
for (int nm= 0; nm < 50;nm++) {
cout<<fibb.at(nm)<<" ";
<em> }</em>
return 0;
}