Wednesday, December 30, 2009

Hi how are u ?

--
Regards
Amandeep
"GREAT LEADERS ARE MADE, NOT BORN"

www.zanetine.com

Tuesday, December 15, 2009

WAP to find the sum of the digits of a given number

After a long time I am writing a blog post for my own blog. :) . Past few weeks, I was so busy with studies and learning etc. and these days exams are going on. But still I am not able to get rid of my "Love with C". Before the exam of Punjabi and PC computing, I was making C-Programs, instead of preparing those subjects. Well, because its good for me because the program i was wanting to write but never due to my exams i wasn't trying that. I thought i'll take time. But yesterday due to some happenings, I was little frustrated so I just sat in front of computer and started writing the old pending program. I totally involved in program and it gave me desired result. So woooooopy.. :)

Program was, WAP to find the sum of the digits of a given number. Here i wasn't knowing about how to calculate the sum of the digits of a number whose size is not give. Finally i reached at the solution and finished this program.
So here it goes..

/*WAP to find the sum of the digits of a given number.*/


#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
#include<math.h>
void main()
{
long int n,div;
int i,temp,sum=0,length;
char *str;
clrscr();
printf("\nEnter value = ");
scanf("%ld",&n);
ltoa(n,str,10); //converts long int to string
length=strlen(str); //found the length of string
temp=length-1;
div=pow(10,temp);
for(i=0;i<length;i++)>
{
sum+=(n/div)%10;
div=div/10;
}
printf("\n%d",sum);
getch();
}

Alternate Way


void main()
{
long int n,div,temp;
int sum=0;
clrscr();
printf("\nEnter value = ");
scanf("%ld",&n);
while(n>0)
{
  temp=n%10;
  n=n/10;
  sum+=temp;
}
printf("\n%d",sum);
getch();
}



I wish, try this program and if something is wrong in this program then just let me know. If any other idea to make this kind of program even better then also leave a reply with your own idea.

Regards
Amandeep Singh

Saturday, August 1, 2009

1 August – By Amandeep Singh

Finally, got time to post something on my blog. Past few days, I was not in position to write my blog due to some health problems, eye test (Eyes were okay … woopyy),  X-ray of my nose (got some septum problem), and main problem that occur, was about brain. Over stress over brain, so much work, studies, learning everything and busy schedule lead me to lack of concentration, it was feeling like that I was working on three things at once. OMG!! my brain was thinking every day , every night. And doctor suggested my to take rest and sleep tight. lolzzz..  i do yaar.. but don’t say me to take rest. Anyways he Gifted me a heavy bundle of medicines.

Anyways, Right now i was just writing some programs in C, learning Programming. All the day C-Language, JavaScript, XHTML/CSS etc .. this is my daily life.. wake up get ready for Office, then College and again Office and return home for Studying. A busy schedule. From Wednesday or Friday, I am gonna teach mathematics to few students. Seems interesting…?? yeah but some difficult too .. because its my first time to teach someone (of higher studies) and this will add more weight to my brain. :)

Opening poetbay, just pulls me to my past although i visit after  gap of days. Why i look at that “Profile” ? Why i read those poems again and again ? why i found something new every time in those poems? Every time when i read those poems of Someone, I feel, I better understand these poems now from then. hmmm…… I am  living the busiest life I ever IMAGINED , but still I get the time to think about that ONE. So ………

Oye have you finished that PROGRAM?….OMG…This C- will not leave me alone…. ok bye

Monday, June 29, 2009

The Real Meaning of Excellence

Hi friends!  Today i was just reading my emails and while reading emails I read this email and i found this email interesting and i thought of to share this email with you guys. So here it goes……….

A man once visited a temple under construction where he saw a sculptor making an idol of God. Suddenly he noticed a similar idol lying

nearby.

Surprised, he asked the sculptor, "Do you need two statues of the same idol?"
"No," said the sculptor without looking up, "We need only one, but the first one got damaged at the last stage."
The gentleman examined the idol and found no apparent damage. "Where is the damage?" he asked.
"There is a scratch on the nose of the idol." said the sculptor, still busy with his work. "Where are you going to install the idol?"

The sculptor replied that it would be installed on a pillar fifty feet high. "If the idol is that far, who is going to know that there

is a scratch on the nose?" the gentleman asked.
The sculptor stopped his work, looked up at the gentleman, smiled and said, "I will know it."

The desire to excel is exclusive of the fact whether someone else appreciates it or not. "Excellence" is a drive from inside, not outside.

Excellence is not for someone else to notice but for your own satisfaction and efficiency.. ..

Tuesday, June 23, 2009

Old Gold Days

OMG!! Today its just fantastic. I just get few seconds to take breathe and i don’t know what came in my mind, I just logged in Poetbay and every moment and memories just refreshed my mind and i felt so easy and comfortable. I read the old & rusty poems of mine and some memorable poems of others. Since being untouched from Poetbay, got some messages from friends and also i read some old messages. The beautiful memories and saw the bookmarks that i ever saved. Read those bookmarked poems and commented on new ones. Some interesting “Pages” i read, now reached to 21. A beautiful text on friendship of India and Tibet. 

Regards

Amandeep Singh

Wednesday, May 27, 2009

Why Protesting? Please Explain (By Amandeep Singh)

Few days ago I was just decided that i'll not write about the religions, caste systems etc because i wasn't having time for these things. But I couldn't control over myself after seeing this clash in Punjab. The worst one without no reason. I don't know people have gone mad or what .. I couldn't even understand why are they protesting and I didnt like the way they are protesting, their reason of protesting...totally bullshit....

I don't know why the people behave like that ...yaar if you really want to protest then please protest according to rules that means please follow some rules that no public property or any kind of death is caused by you ..

You burnt two trains , you put the 50 cars in fires...crowd killed the two peoples ...heay what is this ...Have you gone mad?

anyways lets talk upon this briefly ...what happened, where happened, why happened, and why are they protesting....

What Happened so that they protesting?

A Dera Deputy-Chief Niranjan Das is attacked (attempt to murder) by few people in Vienna, Austria in a Guruduwara. Since he has a number of followers so when they came to know about this incident...they started burning trains, public property, buildings, shops etc..

I couldn't understand one thing that ...this all happened in Vienna, Austria which is thousands of miles away and why are you protesting even those people have arrested who killed the Niranjan Das..

ok He is injured, 6 people are arrested who tried to kill him... then why are you protesting?

No Reason .....

why are you blaming Punjab Government and Indian Government.. what they did ...heay guys please think before saying anything ... why would Punjab Government or Indian Government will kill that Baba ... a totally un known person .. Punjab and Indian government are not having time for these foolish and unwanted things ... they have so many other problems... and also Indian Government can't provide security to every person living or travelling abroad.. Its his decision if he/she going to abroad (to any country) ... So guys please keep in mind.

You people not having the complete knowledge about the incident but still you are holding sword and forcing the shopkeepers, the bus drivers to stop their work...Parents are bringing the children back to home from the Schools. Schools, colleges, markets, everything just closed.....its like a curfew .... why like a curfew ...It is a Curfew ....

ok you say you want to protest?? ok who is stopping you ... But follow some rules yaaar..

Protest according to rules.. Don't Burn the trains ... ( You can stop the trains ...but there must be a time limit ...)

Don't force any one to close the shops etc...

If you really have the feeling of Revenge then go to Vienna and kill those persons who killed yours. But why are you killing or hurting those innocent people who did nothing ...

You can have a peaceful march.

so there lots other options to protest.....

And what you think Niranjan Das was so much clean and honest person.....lolzz..no way these deras are just a fake and they just play with the feelings of people and grab the money from them ...so guys you must be aware of all these things...

Don't waste your life in these fights, riots , clashes etc...

Kya yaar mood kharaab kar diya in riots etc ne ... i was gonna write something about my life, about "Someone" and about my friends... but .......chalo yaar fir kabhi...

Wednesday, May 6, 2009

AIEEE 2009 Result

Hi Friends, I hope you all are now stress free because now the toughest exams are over now. I recieved emails from my friends about the AIEEE Results. They all were very excited and waiting for the result announcment but i think since you all have checked the solution of your exam then you can get an idea that where you stand.. Anyways my best wishes are with you and I hope that you'll get a chance to study in NITs.

Anyways lets come to the point now , since you all are curious about the exam date and waiting for that since your exam was over. So here it goes.

Result of AIEEE will be Declared on or before 7th June 2009. and the result cards would be dispatched from 12 June to 27 June .. So just Cross your fingers and just pray because this is the all that you all have now.

Regards
Amandeep Singh

Tuesday, April 28, 2009

AIEEE 2009 Answer Key for Code A, Code B, Code C and Code D

AIEEE 2009 - Key for versions A, B, C, D

 

Code A

KEY

Code B

KEY

Code C

KEY

Code D

KEY

 

1

2

1

1

1

4

1

1

 

2

1

2

4

2

4

2

1

 

3

3

3

2

3

4

3

1

 

4

1

4

3

4

3

4

1

 

5

2

5

3

5

2

5

4

 

6

1

6

1

6

1

6

2

 

7

4

7

1

7

4

7

1

 

8

3

8

2

8

4

8

1

 

9

4

9

2

9

4

9

1

 

10

2

10

1

10

3

10

4

 

11

4

11

2

11

1

11

4

 

12

2

12

4

12

2

12

4

 

13

2

13

3

13

4

13

4

 

14

3

14

3

14

3

14

1

 

15

4

15

2

15

2

15

3

 

16

2

16

2

16

4

16

3

 

17

2

17

2

17

3

17

1

 

18

2

18

1

18

3

18

1

 

19

3

19

1

19

4

19

1

 

20

1

20

2

20

1

20

4

 

21

2

21

2

21

2

21

4

 

22

4

22

2

22

3

22

1

 

23

4

23

2

23

3

23

2

 

24

1

24

1

24

3

24

4

 

25

4

25

1

25

4

25

2

 

26

1

26

1

26

1

26

4

 

27

4

27

3

27

3

27

2

 

28

3

28

2

28

3

28

1

 

29

1

29

2

29

2

29

2

 

30

2

30

2

30

2

30

4

 

31

3

31

2

31

1

31

4

 

32

4

32

1

32

2

32

3

 

33

3

33

4

33

3

33

4

 

34

3

34

3

34

4

34

4

 

35

3

35

2

35

2

35

2

 

36

3

36

2

36

3

36

3

 

37

4

37

1

37

1

37

3

 

38

4

38

4

38

4

38

4

 

39

3

39

1

39

2

39

3

 

40

4

40

3

40

2

40

1

 

41

3

41

4

41

1

41

4

 

42

3

42

1

42

4

42

4

 

43

3

43

2

43

2

43

2

 

44

2

44

2

44

3

44

4

 

45

2

45

3

45

4

45

2

 

46

4

46

2

46

3

46

2

 

47

2

47

1

47

1

47

2

 

48

1

48

4

48

2

48

4

 

49

1

49

2

49

3

49

1

 

50

2

50

1

50

3

50

1

 

51

2

51

2

51

3

51

3

 

52

2

52

2

52

4

52

3

 

53

3

53

4

53

1

53

1

 

54

2

54

1

54

3

54

3

 

55

2

55

2

55

1

55

4

 

56

3

56

1

56

1

56

4

 

57

3

57

1

57

1

57

1

 

58

2

58

1

58

3

58

2

 

59

2

59

4

59

3

59

2

 

60

3

60

3

60

2

60

2

 

61

3

61

2

61

4

61

4

 

62

3

62

4

62

3

62

4

 

63

3

63

1

63

4

63

1

 

64

3

64

3

64

1

64

1

 

65

2

65

1

65

3

65

2

 

66

3

66

1

66

4

66

3

 

67

1

67

2

67

3

67

2

 

68

2

68

4

68

4

68

4

 

69

4

69

1

69

4

69

4

 

70

4

70

4

70

4

70

2

 

71

3

71

4

71

3

71

3

 

72

1

72

1

72

4

72

3

 

73

2

73

3

73

1

73

1

 

74

3

74

3

74

4

74

4

 

75

2

75

3

75

4

75

4

 

76

2

76

2

76

3

76

1

 

77

2

77

1

77

4

77

2

 

78

2

78

1

78

4

78

1

 

79

2

79

3

79

3

79

3

 

80

4

80

1

80

2

80

3

 

81

1

81

4

81

3

81

1

 

82

1

82

3

82

3

82

4

 

83

3

83

3

83

3

83

4

 

84

2

84

1

84

4

84

1

 

85

1

85

4

85

1

85

1

 

86

1

86

1

86

1

86

3

 

87

3

87

3

87

2

87

4

 

88

4

88

4

88

3

88

4

 

89

3

89

2

89

4

89

1

 

90

2

90

2

90

1

90

1

 
Powered By Blogger