C is the answer to your question
C
Enter January in A1 hold mouse in bottom right hand corner of cell. Hold mouse button down and drag the mouse. Excel will populate the months of the year
Answer:
public class num7 {
public static void main(String[] args) {
int n =1;
while(n<200){
if(n%5==0 && n%7==0){
System.out.print(n);
System.out.print(",");
}
n++;
}
}
}
Explanation:
- In Java programming Language
- Create and initialize an int variable (n=1)
- Create a while loop with the condition while (n<200)
- Within the while loop use the modulo operator % to check for divisibility by 5 and 7
- Print the numbers divisible by 5 and 7
By press over the location that you want using mouse
Answer:
This program is written in C++. The explanation of the code is given below in the explanation section.
Explanation:
#include <iostream>
using namespace std;
//factorial calculation
int fact(int n) {
if (n == 0 || n == 1)
return 1;
else
return n * fact(n - 1);
}
int main() {
int n, r, comb; /* n represent number of people (population), r represent the number of selection from population and combination represent number of ways or combination */
cout<<"Enter n : ";// prompt user to enter population i.e. total number of people
cin>>n;//store into n
cout<<"\nEnter r : ";//prompt user to enter number of selection from population
cin>>r;
comb = fact(n) / (fact(r) * fact(n-r));// calcuate combination- number of differnt ways to form a committe
cout << "\nCombination : " << comb; //show the result
return 0;
}