C++ program to separate digits of a number

c++ program to separate digits of a number
c++ program to separate digits of a number

c++ program to separate digits of a number:


1)#include<iostream>

2)using namespace std   

3)int main()

4){

5)int number,digit,n;

6)cout<<"enter  digits of  number";

7)cin>>n;

8)cout<<"Enter a number";

9)cin>>number;

10)for(int i=0;i<n;i++)

11){

12) digit=number % 10;

13) cout<<digit<<", ";

14) number=number / 10;

15)}

16)return 0;

17)}

DESCRIPTION:                                                                          

This is a c++ program to separate digits of a number.program to separate digits of a number in c++.This program is about how to seperate digits of a number in c++.
c++ program to separate digits of a number
c++ program to separate digits of a number
c++ program to separate digits of a number
c++ program to separate digits of a number
This is about how to seperate digit in c++ .The above programe is c++ program to separate digits of a number.We use for loop and if statment to seperate digit.c++ program to separate digits of a number in an easy way is just found on Mrzinc Programming.
To seperate digit of a number using c++ programe is an easy way to c++ program to separate digits of a number.To learn c++ in an easy way is very interesting by Mrzinc programming site.





 

Post a Comment

0 Comments