Printing Name

 Printing name


C Program
#include <stdio.h>
#include <stdlib.h>
int main()
{
    char name[10];
   printf("Enter Your Name:");
   scanf("%s",&name);
   printf("Your name is %s",name);
}
Java Program
import java.util.Scanner;

public class SimpleProgram5 
 {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		System.out.print("Enter Your Name:");
		String name = s.nextLine();
		System.out.print("Your name is "+ name);

	}

 }
 


Python Program
name = input("Enter your name\n")
print("YOUR NAME IS " + name)

0 Comments:

Post a Comment