MSK Technologies

Home
Practice Programs
Java Programs Python Programs Java Quiz
Pages
Python Java Material PLSQL Material
Search A Job

Write a C-program to count the number of divisible numbers in a given range(1-100) using do while loop?

  1. Home
  2. C Language Programs

Write a C-program to count the number of divisible numbers in a given range(1-100) using do while loop?

Write a C-program to count the number of divisible numbers in a given range(1-100) using do while loop


#include <stdio.h>
int main() {
    int x=1,n,count=0;
    printf("Enter n value ");
    scanf("%d",&n);
   do
    {
        if(x%n==0)
        {
            count++;   //count=count+1;
        }
        x++;
    } while(x<=100);
    printf("%d Divisible count is %d",n ,count);
  
    return 0;
}

Output:

Enter n value 2
50

Enter n value 3
33




More Programs


83 . Write a C-program to count the number of divisible numbers in a given range(1-100) using do while loop
84 . Write a C-program to print factorial number using do while loop
85 . Write a C-program to print factorial of n numbers using do while loop
86 . Write a C-program to print sum of natural numbers using do while loop
87 . Write a C-program to print sum of even numbers using do while loop
88 . Write a C-program to print sum of odd numbers using do while loop
89 . Write a C-program to print sum of even or odd numbers based on the n value using do while loop
90 . Write a C-program to print sum of even or odd numbers based on the n value using single do while loop
91 . Write a C-program to display table using do while loop
92 . Write a C-program to print a to z using do while loop
93 . Write a C-program to print ASCII values of a to z using do while loop



Apply For The Job

Apply For Job

Java Material

Python Material

PLSQL Material

.Net Material

Java Practice Programs

400 Java Programs

Java Practice Programs

Write a Java program to find the area of a triangle.

Write a java Program to check the given number is Palindrome or not

Write a Java program that takes five numbers as input to calculate and print the average of the numbers

Write a Program to find second largest number in an array

Write a Java program to print the sum, multiply, subtract, divide and remainder of two numbers

Python Practice Programs

Write a program to check armstrong numbers in certain interval

Write a Python program to convert kilometers to miles.

Write a program to merging dictionaries

Write a Python program that prints the calendar for a given month and year.

Write a Python Program To Find ASCII value of a character.

Java Quiz

Java Quiz - 1

Java Quiz - 18

Java Quiz - 7

Java Quiz - 3

Java Quiz - 14

Courses
Java Python PLSQL .Net ADO.Net About Us
Quick Links
Daily Use English Sentences Daily General Knowledge General Knowledge Latest Update Inventions and Inventors జనరల్ నాలెడ్జ్ General Knowledge Spoken English Spoken Hindi GK Hindi Telugu Facts Unknown Facts Psychology Facts Motivation Quotes విటమిన్ - సి,డి,ఇ,కె Android
Spiritual
రాధాకృష్ణ భగవద్గీత Motivation Quotes Slokas Talapatra Nidhi ఆధ్యాత్మిక భక్తి ప్రపంచం Sadhguru Sai Motivation Quotes గౌతమ బుద్ధుడు Bhagavad Gita Quotes
Newsletter

Dolor amet sit justo amet elitr clita ipsum elitr est.

© sateeshm, All Right Reserved. Designed By sateeshm
Home Help FQAs