1.

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

Answer»

d Answer:-Question:Write a program in C++ to CHECK whether the entered number is divisible by 100 or not. Solution:Here comes the program. #INCLUDE using namespace STD;int main() { int a; cout << "Enter a number: "; cin >> a; if (a%100==0)     cout << "Number is divisible by 100."; else     cout << "Number is not divisible by 100"; return 0;}Algorithm:START. Accept the number.Divide the number by 100 and find the remainder. If the remainder is zero, number is divisible by 100 else not. Display the result. STOP.See the attachment for OUTPUT ☑.



Discussion

No Comment Found