Question: in c programming please Divisible By Seven Description: For this exercise, you are tasked with developing a program titled Divisible By Seven. The goal of

in c programming please Divisible By Seven
Description:
For this exercise, you are tasked with developing a program titled "Divisible By Seven." The goal of this program is to determine and display the count of numbers between 1 and a userspecified number that are divisible by seven without any remainder.
Here's the sequence of operations the program should follow:
1. Start by prompting the user to input a whole number.
2. Implement a loop that traverses through numbers from 1 up to the user's input.
3. During each iteration, check if the current number is divisible by seven without leaving any remainder.
4. Keep a count of how many such numbers you find.
5. After completing the loop, display the count to the user.
For example: \begin{tabular}{|c|c|c|}
\hline & Input & Expected \\
\hline \(\times \) & 4747 & \begin{tabular}{l}
Enter a whole number: \\
678 numbers between 1 and 4747 are divisible by seven with no remainder.
\end{tabular}\\
\hline \(\times \) & 59 & \begin{tabular}{l}
Enter a whole number: \\
8 numbers between 1 and 59 are \\
divisible by seven with no remainder.
\end{tabular}\\
\hline \(\times \) & 700 & \begin{tabular}{l}
Enter a whole number: \\
100 numbers between 1 and 700 are divisible by seven with no remainder.
\end{tabular}\\
\hline \(\times \) & 9654 & \begin{tabular}{l}
Enter a whole number: \\
1379 numbers between 1 and 9654 are divisible by seven with no remainder.
\end{tabular}\\
\hline \(\times \) & \(-7\) & \begin{tabular}{l}
Enter a whole number: \\
2 numbers between 1 and -7 are \\
divisible by seven with no remainder.
\end{tabular}\\
\hline \(\times \) & 0 & \begin{tabular}{l}
Enter a whole number: \\
1 numbers between 1 and 0 are divisible by seven with no remainder.
\end{tabular}\\
\hline \(\times \) & \(-700\) & \begin{tabular}{l}
Enter a whole number: \\
101 numbers between 1 and -700 are divisible by seven with no remainder.
\end{tabular}\\
\hline
\end{tabular}\begin{tabular}{|c|c|c|}
\hline & Input & Expected \\
\hline \(\times \) & 4747 & Enter a whole number: 678 numbers between 1 and 4747 are divisible by seven with no remainder. \\
\hline \(\times \) & 59 & \begin{tabular}{l}
Enter a whole number: \\
8 numbers between 1 and 59 are divisible by seven with no remainder.
\end{tabular}\\
\hline \(\times \) & 700 & \begin{tabular}{l}
Enter a whole number: \\
100 numbers between 1 and 700 are divisible by seven with no remainder.
\end{tabular}\\
\hline \(\times \) & 9654 & \begin{tabular}{l}
Enter a whole number: \\
1379 numbers between 1 and 9654 are divisible by seven with no remainder.
\end{tabular}\\
\hline \(\times \) & \(-7\) & \begin{tabular}{l}
Enter a whole number: \\
2 numbers between 1 and -7 are divisible by seven with no remainder.
\end{tabular}\\
\hline \(\times \) & 0 & \begin{tabular}{l}
Enter a whole number: \\
1 numbers between 1 and 0 are divisible by seven with no remainder.
\end{tabular}\\
\hline \(\times \) & \(-700\) & \begin{tabular}{l}
Enter a whole number: \\
101 numbers between 1 and -700 are divisible by seven with no remainder.
\end{tabular}\\
\hline
\end{tabular}
in c programming please Divisible By Seven

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!