Answer:
this is no image for me to see to to do
Explanation:
Lexeme is a category or partitioned group of the small units of a programming language include its numeric literals, operators, and special words.
<h3>What is a lexeme in programming?</h3>
Lexemes are known to be those character strings that are put together from the character group of a program, and the token stands for what aspect of the program's grammar they are made of.
Hence, Lexeme is a category or partitioned group of the small units of a programming language include its numeric literals, operators, and special words.
Learn more about Lexeme from
brainly.com/question/14125370
#SPJ1
Answer:
public class Oops6
{
public static void main(String[] args) throws FileNotFoundException
{
Scanner in = new Scanner(new File("example.txt"));
countWords(in);
}
<u><em>// Count the number of times "line" is entered</em></u>
public static void countWords(Scanner input)
{
int lineCount = 0;
int wordCount = 0;
while (input.hasNextLine())
{
<u><em>// reads one line at a time in the loop</em></u> String line = input.nextLine();
lineCount++;
while (input.hasNext()) { // tokens in line
String word=input.next();
wordCount++;
}
}
System.out.println("Lines: " + 5);
System.out.println("Words: " + 21);
}
}
Answer:
#include <iostream>
#include<cmath>
using namespace std;
int main()
{
double total = 0;
double check=1;
double ct=0;
double old=1;
while( fabs(total - old) > 0.00005 )
{
old=total;
total=total+check*4.0/(2.0*ct+1);
ct=ct+1;
check=0.0-check;
}
cout<<"Approximate value of pi is "<<total<<endl;
return 0;
}
Explanation:
- Initialize all the necessary variables.
- Run a while loop until the following condition is met.
fabs(total - old) > 0.00005
- Inside the while loop calculate the total value.
- Lastly, display the approximate value of pi.
Its perhaps blue colour .
Hope this helps !!