I have this error, " lvalue required as left operand of assignment," for line 10 where scanf command appears. I can't figure out a solution to it.

#include <stdio.h>

int main()
{
   int start;
   char delay;
  
   printf("We're close to blast off.\n");
   printf("countdown initiated");
   scanf=("%d", &start);

   do
   {
   printf("T minus %d seconds.\n", start);
   start--;
   for(delay=0;delay<100000;delay++);
   }
   while(start>0);

   printf("blast off.");
   return(0);
}

thanks,

Look up the syntax for a scanf() statement

scanf is a function, not a variable,
there should not be an = equal sign scanf=(something),
if should be scanf(something);

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.