How will I capture a string or char input if I have a checker that is equated to zero
because atoi/atof reads the string or char as zero

Code:
#include <stdio.h>
#include <conio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>

int a(double sales,double sepcost)
{
    double NRV;
    NRV=sales-sepcost; 
    printf("The Net Realizable Value is: %.3lf\n",NRV);

}
int main()
{
    double sales,sepcost;
    char error[128];
  
    do{
      system("cls");
      printf("Please input your Sales Value: \n");
      scanf("%s",&error);
      sales=atof(error);
      printf("Please input your Separable Cost: \n");
      scanf("%s",&error);
      sepcost=atof(error);
      if(sales<0){
        system("cls");
        printf("Invalid input for Sales, Please try again!!\n");
        system("pause");
        }
      if(sepcost<0){
        system("cls");
        printf("Invalid input for Seperabe Cost, Please try again!!\n");
        system("pause");
        }
      }while(sales<0||sepcost<0);
      a(sales,sepcost);

getch();
}