I'm trying to read a character in from the keyboard, however, the first time I try to read data of type "char" it ignores the comand. There are other scanf's previous to the first char-attempt for inputting doubles. Here is some code.

Code:

#include <stdio.h>

//prototypes
double ends(char, double*, double*);

int main(void){
//this will be used to define the endpoints of the calculations
char ch='p';
double a;
double rightend, leftend, step;