blob: bd31fe0ede68ac8c5311b66efce6893c56ae0d9a (
plain)
1
2
3
4
5
6
7
8
9
|
// Exampple 8.1
//Write a program to read a series of words from terminal using scanf function.
//Read data using scanf function
disp("Enter text:")
[word1,word2,word3,word4]=scanf("%s %s %s %s");
//Printing the results
printf("word1 = %s\nword2 = %s\n",word1,word2);
printf("word3 = %s\nword4 = %s\n",word3,word4);
|