0
Help I can't do A program that checks if a given number is divisible by 3.5, 7 or 11
11 Respostas
+ 8
show your attemp at least so that you can be guide on it
+ 6
panik 007 Please,
If you need help, you can post the code you're struggling with!
• SEARCH for similar QUESTIONS or ANSWERS before posting
• https://www.sololearn.com/post/75089/?ref=app
+ 5
step 1: Ask user to input a number
step 2: use if condition to check if number is divisible by 3 , 5 , 7 , 11.
(if num % 3 == 0... and so on for other ..
then print message divisible.
else:
print message not divisible.
There is many ways to do and first try yourself as said by **Asterisk**
+ 2
Can you tell me why it doesn't work the words are written in Italian because I'm Italian
#include <stdio.h>
#include <iostream>
#include <math.h>
int main()
{
using namespace std;
//dichiarazione variabili
int a;
cout<<"Inserisci numero :";
cin>>a;
if (a%3==0)
cout<<"e' divisibile per 3 :";
else if (a%5==0)
cout<<"e divisibile per 5 :";
else if (a%7==0)
cout<<"e divisibile per 7 :";
else if (a%11==0)
cout<<"e divisibile per 11 :";
else if (a%13==0)
cout<<"e divisibile per 13 :";
Else cout<<"il nume non e' divisibile per nessuno di questi numeri";
system("Pause");
}
+ 1
Ok Solved
+ 1
Yes I had noticed thanks anyway
0
I have it on my PC now I'm on the phone anyway soon I'll send you the photo
0
You can check this by using % operator :-)
0
Thanks
0
Thanks , I managed to do it thank you very much d. Connect
0
Else> else