Description:
In C++ if there is conditional logic then "if", "else" statements are used.
Code:
In C++ if there is conditional logic then "if", "else" statements are used.
Code:
#include<iostream>
#include<conio.h>
#include<iomanip>
using namespace std;
int main()
{
int a,b,c;
cout<<"A programe to check the divisibility of a number by 3"<<endl;
xy:
cout<<"Enter the number to check its divisibility"<<endl;
cin>>a;
cout<<endl;
if(a%3==0)
{
cout<<"The number is divisible by 3"<<endl;
}
goto xy;
getche();
return 0;
}
No comments:
Post a Comment