Header Ads Widget

C++ program to divide a number by any other number

 C++ program to divide a number by any other number

Given a number divide it  by other number , write a program to divide a number by other number .

Sample input:-

12 
4

Sample output:-

3

 C++ program to divide a number by any other number

The objective of code is to divide a number by other number .

Code(C++):-

#include <bits/stdc++.h>
using namespace std;
int main() {
    int a,b,div;
    cin>>a>>b;
    div=a/b;
    cout<<div<<endl;
}

Output:-

12
4
3



Recommended Post :-

HCL Coding Questions:-

Capgemini Coding Questions:-

Companies interview:-

Full C course:-    

Key points:-

Cracking the coding interview:-

 Array and string:-

Tree and graph:-

Hackerearth Problems:-

Hackerrank Problems:-

Data structure:-

 MCQs:-