Write a program that uses a function to display all the numbers divisible by 3 between 0 and 100.
#include<iostream>
using namespace std;
void divisible_3(){
for(int i =1 ; i<100; i++){
if(i%3==0){
cout<<"\t"<<i;
}
}
}
int main(){
divisible_3();
}
Comments
Leave a comment