Command Line Programming Problem 7

You do not have access for this page.


To access this page please purchase:
TCS Coding Questions with Answers Products
TCS Drive Preparation Online Classes
PrepInsta-SharpSkills Paid Materials Combo
TCS NQT Online Class


Note:- Please purchase the products mentioned above to get access to the page. Also, if you have any queries related to product purchase drop a message on our Facebook page.

Please Login/Signup to comment

3 comments on “Command Line Programming Problem 7”


  • abhijeet singh

    ********************************very easy c++ program**************************
    #include
    #include
    using namespace std;
    int main()
    {
    int origNum, num, rem,count=0;
    cout <> origNum;
    num = origNum;
    while(num != 0)
    {
    rem = num % 10;
    num /= 10;
    count++;
    }
    num=origNum;
    rem=1;
    int sum=0;

    while(num!=0)
    {rem=num%10;
    sum=sum+pow(rem,count);
    num /= 10;
    }
    if(sum==origNum)
    {
    cout<<"armstrong no";

    }
    }


  • Meghana

    u gave in a different process.
    for armstrong there is a method to execute.please provide as easy as possible.it is a loss for the paid material members like me


    • Mohd Saif

      # python 🙂 Meghana

      n=int(input())
      y=len(str(n))
      temp==n
      x=0
      while(n>0):
      a=n%10
      x=x+pow(a,y)
      n=n//10
      if(temp==x):
      print(f”YES {temp} is a Armstrong Number”)
      else:
      print(f”NO {temp} is a Armstrong Number”)