7.2 Character Input

7.2 Character Input

  1. [0.5] Take a Character input from the user and print the Character. (Repeated)

  2. [0.6] Take two Character inputs separated by space/newline from the user and print both Characters. (Repeated)

  3. [1] Take Character input and print the character for N times (Take Input N from the user at the beginning)

  4. [2] Take Character input until the input is "0".

সমাধান

[0.5] Take a Character input from the user and print the Character. (Repeated)

#include<stdio.h>
int main(){
    char ch;
    
    scanf("%c", &ch);
    printf("%c\n", ch);
    
    return 0;
}

[0.6] Take two Character inputs separated by space/newline from the user and print both Characters. (Repeated)

[1] Take Character input and print the character for N times (Take Input N from the user at the beginning)

[2] Take Character input until the input is "0".

Last updated