0

Help I can't do A program that checks if a given number is divisible by 3.5, 7 or 11

16th Oct 2019, 10:23 AM
panik 007
panik 007 - avatar
11 ответов
+ 8
show your attemp at least so that you can be guide on it
16th Oct 2019, 10:28 AM
✳AsterisK✳
✳AsterisK✳ - avatar
+ 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
16th Oct 2019, 10:50 AM
Danijel Ivanović
Danijel Ivanović - avatar
+ 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**
16th Oct 2019, 10:43 AM
★«D.Connect_Zone»
★«D.Connect_Zone» - avatar
+ 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"); }
16th Oct 2019, 8:23 PM
panik 007
panik 007 - avatar
+ 1
Ok Solved
16th Oct 2019, 8:40 PM
panik 007
panik 007 - avatar
+ 1
Yes I had noticed thanks anyway
17th Oct 2019, 2:42 PM
panik 007
panik 007 - avatar
0
I have it on my PC now I'm on the phone anyway soon I'll send you the photo
16th Oct 2019, 10:32 AM
panik 007
panik 007 - avatar
0
You can check this by using % operator :-)
16th Oct 2019, 10:34 AM
Haider Sultan
Haider Sultan - avatar
0
Thanks
16th Oct 2019, 10:45 AM
panik 007
panik 007 - avatar
0
Thanks , I managed to do it thank you very much d. Connect
16th Oct 2019, 11:22 AM
panik 007
panik 007 - avatar
0
Else> else
17th Oct 2019, 3:02 AM
Aditya
Aditya - avatar