#include<stdio.h>
main()
{
int i,words,spaces;
char a[30];
printf("enter the string") ;
scanf("%s",a);
for(i=0;a[0]!="\0";i++)
{
if (a[i]=' ')
spaces++;
}
printf("the no. of spaces in the string is %d",spaces);
printf("the number of words in the string is %d",spaces+1);
}
how to find the frequency of words in a sentence?
//program to find occurence of a word in a sentence
import java.io.*;
public class cnt2
{
public static void main(String args[])throws IOException
{
int times=0,count=0,x=0,no=0;
InputStreamReader ir=new InputStreamReader(System.in);
BufferedReader br=new BufferedReader(ir);
String s,w;
System.out.println("Enter the sentence:");
s=br.readLine();
System.out.println("Enter the word:");
w=br.readLine();
try{
for(int i=0;i<s.length();i++)
{
if(w.charAt(0)==s.charAt(i))
{
for(int j=0;j<w.length();j++,i++)
{
if(s.charAt(i)==w.charAt(j))
{ count=count+1;}
if(count==w.length())
{no=no+1;count=0;};
}
}
}
catch(Exception e){}
if(no==0)
{
System.out.println("word is not present");
}
else
{
System.out.println("word is present "+no+" times");
}
}
}
#include<iostream.h>
#include<conio.h>
#include<string.h>
char temp[30][30];
int check(char x[],int n)
{
for(int i=0;i<n;i++)
{
if(strcmp(temp[i],x)==0)
return 0;
}
return 1;
}
void main()
{
char a[100],b[20],ch,c[10][10];
int i=0,j,n=0,k=0,count,m;
clrscr();
cout<<"\n Enter any string and end with $::";
cin.get(ch);
do
{
a[n]=ch;
n++;
cin.get(ch);
}while(ch!='$');
a[n]='\0';
for(;;)
{
for(j=0;(a[i]!=' ')&&(a[i]!='\0');j++)
{
b[j]=a[i];
i++;
}
b[j]='\0';
strcpy(c[k],b);
k++;
if(a[i]==0)
break;
i++;
}
cout<<"\n\n------------------------------------\n";
cout<<"\n\tword\tFrequency\n";
cout<<"\n\n------------------------------------\n";
for(i=0;i<k;i++)
{
count=1;
m=check(c[i],i);
for(j=i+1;j<k;j++)
{
if(strcmp(c[i],c[j])==0 && m==1)
count++;
}
if(m==1)
{
strcpy(temp[i],c[i]);
cout<<"\t"<<c[i]<<"\t"<<count<<endl;
}
}
cout<<"\n\n------------------------------------\n";
getch();
}
to read and write occurence of a particular character
Program Store Enable: The read strobe to external program memory.
main(){int age[100],count=0,i;clrscr();for(i=0;i
I don't really understand your question, but maybe it is the compiler what you mean.
For example, to interpret user input; to read data from a text file or from some other program that produces the data as a string.For example, to interpret user input; to read data from a text file or from some other program that produces the data as a string.For example, to interpret user input; to read data from a text file or from some other program that produces the data as a string.For example, to interpret user input; to read data from a text file or from some other program that produces the data as a string.
This is for RPG ILE Programming.
The input and output shafts need to be marked Then put in a particular gear Rotate the input shaft ten revolutions and count the output shaft revolutions. Or read the specs in the manual OR disassemble the trans and count the gear teeth.
I read the book the word count is about 450
get a tutor
You can not. If you are experiencing a particular problem you can check TSB's for an updated PROM. That is Program Read Only Memory. It would have to purchased through the dealer.
it only has one stupid idiot.. can't you read or count??
There are a number of websites that allow one to read about the Apollo space program. Wikipedia has many details about the program and each of the missions.
to read the particular news of a particular day
no
A .txt can be read with notepad.
The Read 180 program is a reading program to improve the reading and writing skills of students in grades 4 through 12. The program uses software and an iPad to accomplish this.
The ALT and AST give a read on a blood test together. These two numbers have a ratio together. There is no particular meaning of just the ALT on it's own.
read it aloud and put your hand underneath it and count how many movements you do while saying a word