Skip to main content

Posts

Showing posts from June, 2012

C sharp program for Armstrong Number

using System; namespace Prg2ConsoleApplication9 { class ArmstrongNumber { static void Main(string[] args) { number num = new number(); num.getdata(); } } class number { public void getdata() { int no,r,sum=0,n=0; Console.WriteLine("Enter number\n"); no = Int32.Parse(Console.ReadLine()); n = no; while (n > 0) { r = n % 10; n = n / 10; sum += r*r*r; } if (sum == no) { Console.WriteLine("{0} is a Amstrong number" , no); } else { Console.WriteLine("{0} is not a Amstrong number", no); } Console.ReadLine(); } } } If you want to add any additional points or if you find any discrepancies in this article pleas...

How to overcome stress?

 Photo form Google   First forget the event, thing or surrounding which made you feel stressed. Next, divert your mind to something which makes you feel happy or motivated. Example:  I watch funny videos, talk with my friends, go out for some walk, have some food in your favorite restaurant, if you have a garden or scenery watch it. In offices there should be games between teams for at least for 15 mins to boost their energy level. Some people can do stress relief exercises or yoga. When you know how to manage your time you can reduce your stress level up to 50%. Then plan your day-to-day work and execute it. A good mind and healthy body can overcome stress, remember it. You can play with your pets and it will definitely brighten up your mood.