accept user input in python
#Take Integer Value
nval=int(input("Enter a number : "))
#Take String Value
sval=input("Enter a string : ")
#Take float value
fval=float(input("Enter a floating-point number : "))
accept user input in python
#Take Integer Value
nval=int(input("Enter a number : "))
#Take String Value
sval=input("Enter a string : ")
#Take float value
fval=float(input("Enter a floating-point number : "))
take input
#include<stdio.h>
int main()
{
printf("\n\n\t\tStudytonight - Best place to learn\n\n\n");
int num1, num2;
float fraction;
char character;
printf("Enter two numbers number\n");
// Taking integer as input from user
scanf("%d%i", &num1, &num2);
printf("\n\nThe two numbers You have entered are %d and %i\n\n", num1, num2);
// Taking float or fraction as input from the user
printf("\n\nEnter a Decimal number\n");
scanf("%f", &fraction);
printf("\n\nThe float or fraction that you have entered is %f", fraction);
// Taking Character as input from the user
printf("\n\nEnter a Character\n");
scanf("%c",&character);
printf("\n\nThe character that you have entered is %c", character);
printf("\n\n\t\t\tCoding is Fun !\n\n\n");
return 0;
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us