Search
 
SCRIPT & CODE EXAMPLE
 

C

how to make sure input is integer c

#include <string.h>  

bool isNumber(string s) 
{ 
    for (int i = 0; i < strlen(s); i++) 
        if (isdigit(s[i]) == false) 
            return false; 
  
    return true; 
} 
Comment

PREVIOUS NEXT
Code Example
C :: what is string::npos 
C :: c radians 
C :: C Programming to swap two variables 
C :: C Passing Pointers to Functions 
C :: what is the usage of extern in c 
C :: convert int to char in c 
C :: hello word in c 
C :: check if string is the same c 
C :: strings in c 
C :: How to convert string to int without using library functions in c 
C :: Bootstrap textarea from 
C :: c find last element in array 
C :: how to malloc for matrix in c 
C :: gcd and lcd in c 
C :: array of strings in c 
C :: calculate median 
C :: FCFS algorithm in c to find average turnaround time and waiting time 
C :: cifras de un numero en c 
C :: sleep in c 
C :: esp32 dhcp server 
C :: get boolean from localstorage 
C :: oracle trunc 
C :: increment pointer value in c 
C :: predefined macros 
C :: recursion function bangla 
C :: how tier lists work 
C :: What does x = (a<b)? A:b mean in C programming? 
C :: how to make C program blink on screen 
C :: arma 3 key pressed 
C :: Writing tests for API requests 
ADD CONTENT
Topic
Content
Source link
Name
3+8 =