Number mirror Codechef problem Solution in C languages with logic

Let first we some topic



Receiving input from the user

In order to take input from the user and assign it to a variable, we use scanf function.

The syntax for using scanf:

scanf("%d",&a);

// %d for integer

// %f for real constant

// %c for character

& is the “address of” operator and it means that the supplied value should be copied to the address which is indicated by variable i.


Here the code-->

#include <stdio.h>

int main(void) {

    int n;

    scanf("%d",&n);

    printf("%d",n);

return 0;

}

The logic is very easy that first we declare a integer then take a input through user by using scanf then print that variable.

                                               Thank You 


Comments

Popular posts from this blog

ATM CodeChef soultion in C language with logic

Enormous Input test Codechef Solution in C language with logic