Code:
#include <iostream>
using namespace std;
int main(){
int x;
cout << "Enter the Number: ";
x %=10;
if (x%3==0)
cout << "Divisible";
else
cout << "Not Divisible";
}
Output:
Enter the Number: 21
Not Divisible
Process returned 0 (0x0) execution time : 4.639 s
Press any key to continue.