servo motor query

#include <Servo.h>
Servo myservo;
int pin= 11;             // input pin
int ledpin;
int val=0;
void setup()
{
  myservo.attach(11);
pinMode(pin, INPUT);
digitalWrite(pin, HIGH);
pinMode(ledpin, OUTPUT);
digitalWrite(ledpin, HIGH);  // high for ON, low for OFF
}
void loop()
{
if (pin== HIGH){
myservo.write(180);
}
else
{myservo.write(0);
}
}

I am using this code to run a servo but i am not able to. How can I amplify the signals I am getting from the pin 11.

You're checking "pin" to be HIGH, but you're not reading it anywhere in the loop...

void loop()
{
if (pin== HIGH){
myservo.write(180);
}
else
{myservo.write(0);
}
}

servo will rotate once the pin is HIGH

"pin" has the value 11.
It can never be == 1.

int pin= 11;             // input pin
int ledpin;
int val=0;
void setup()
{
  myservo.attach(11);
pinMode(pin, INPUT);
digitalWrite(pin, HIGH);
pinMode(ledpin, OUTPUT);

You've attached a servo to pin 11, and you're using it as an input.
Good luck with that.

BTW, I answered a very similar question to this the other day: