Take FREE!! Online Mettl Mock Test to Crack TechM and Other Companies Written Exams.
Get Off-Campus Placement Jobs Info !!!
Practice Tech Mahindra Essay Topics

Program Discussion :: Basics

Home > Programs > Basics

21 / 259

Write a Program to sort the number 100001110101 in one traverse.

Answer:

#include
using namespace std;
int main()
{
    int val, num, sum = 0; 
    cout > val;
    num = val;
    while (num != 0)
    {
        sum = sum + num % 10;
        num = num / 10;
    }
    cout 

Asked In :: Adobe

Post Your Answer Here:

Language:

Post Your Reply Here:



Language:

Post Your Reply Here: