Computer Science, asked by dsudhao, 2 months ago

c++ program - to enter a number and check whether it is divisible by 100 or not​

Answers

Answered by allysia
1

Language:

C++

Program:

#include <iostream>

using namespace std;

int main ()  {

int n;

cout << "Enter the number: ";

cin >> n;

if (n%100==0) {  cout << "It's divisible."  ;}

else  { cout << "It's not divisible."  ;}

 return 0;   }

Output:

In the attachment.

Explanation:

  • cin accepts input values in a varibale.
  • cout prints the output on screen.

Attachment:

( On top if you're using the app and below if you're on website)

Attachments:
Similar questions