Computer Science, asked by gamingdarsheel2008, 7 months ago

write a program to check whether the number is divisible by 3 and 5 in visual basic

Answers

Answered by keyboardavro
1

Answer:

Explanation:

// C++ program to print all the numbers  

// divisible by 3 and 5 for a given number  

#include <iostream>  

using namespace std;  

 

// Result function with N  

void result(int N)  

{      

   // iterate from 0 to N  

   for (int num = 0; num < N; num++)  

   {      

       // Short-circuit operator is used  

       if (num % 3 == 0 && num % 5 == 0)  

           cout << num << " ";  

   }  

}  

 

// Driver code  

int main()  

{      

   // input goes here  

   int N = 100;  

     

   // Calling function  

   result(N);  

   return 0;  

}  

 

Similar questions