Keywords

Latest topics
» Topictopic
by PuNcT Thu Jul 27, 2017 6:25 pm

» Regulament
by PuNcT Fri Jun 30, 2017 1:23 pm

» ChatTopics
by PuNcT Sun Jun 25, 2017 6:16 pm

» sdsdsfsfdsf
by Petronel YT Fri Jun 09, 2017 10:43 pm

» sdsdsfsfdsf
by PuNcT Sat Mar 25, 2017 10:18 am

» sdsdsfsfdsf
by PuNcT Sat Mar 25, 2017 10:11 am

» sdsdsfsfdsf
by PuNcT Sat Mar 25, 2017 10:10 am

» sdsdsfsfdsf
by PuNcT Sat Mar 25, 2017 10:09 am

» sdsdsfsfdsf
by PuNcT Sat Mar 25, 2017 10:09 am

» sdsdsfsfdsf
by PuNcT Sat Mar 25, 2017 10:08 am

November 2020
MonTueWedThuFriSatSun
      1
2345678
9101112131415
16171819202122
23242526272829
30      

Calendar Calendar


Algoritm pentru verificare daca un numar este multiplu de un alt numar

View previous topic View next topic Go down

PuNcT
PuNcT
Administrator
Mesaje : 57
Reputatie : 0
http://pcseverin.forum.st

PostPuNcT on Sun Oct 16, 2016 4:02 pm

Cod testat in Code Blocks, pentru cazul cand se doreste testarea multiplicitatii cu 3:
Code:
#include <iostream>
using namespace std;
int main()
{
  int a;
  cout<<"Introduceti numarul";
  cin>>a;
  if(a%3==0){
    cout<<"Numarul este multiplu de 3";
  }
  else{
    cout<<"Numarul nu este multiplu de 3";
  }
  return 0;
}

View previous topic View next topic Back to top

Create an account or log in to leave a reply

You need to be a member in order to leave a reply.

Create an account

Join our community by creating a new account. It's easy!


Create a new account

Log in

Already have an account? No problem, log in here.


Log in

 
Permissions in this forum:
You cannot reply to topics in this forum