0
#include <stdio.h>
#include <stdlib.h>

void fak(int);
int main()
{
  int num;
  printf("ENTER A NUMBER:");
  scanf("%d",&num);
  fak(num);


}

void fak(int num)
{
int i=num;

for(;i>=0;i--)
{
    char a;
    printf("ENTER A CHAR:");
    scanf("%c",&a);
    if('A'<=a&&a<='Z'||'a'<=a&&a<='z')
        printf("%c IS A CHAR.",a);
    else if (a>='0' && a<='9')`enter code here`
        printf("%c IS A INT.",a);
    else
        printf("%c SPECIAL CHAR",a);

When i run this code i am getting this fault. It gets space char twice but i did not enter compiler that.

What should i do?

0 Answers0