// CT project.cpp : Defines the entry point for the console application.
#include "stdafx.h"
// libraries: ctype.h , iostream, conio.h, stdio.h, string.h, stdlib.h, math.h
using namespace std;
struct pgm
{
char line[20];
} s[100];
void check(char s[])
{
cout<<"\n";
if(!strcmpi(s,"If"))
{
cout<<"keyword:If";
return;
}
if(!strcmpi(s,"Then"))
{
cout<<"keyword:Then";
return;
}
if(!strcmpi(s,"Else"))
{
cout<<"keyword:else";
return;
}
if(!strcmpi(s,"[END]"))
{
return;
}
cout<<"expression:"<}
void clrscr( void )
{
// some code here
}
void main ()
{
char t[20];
int i=0, j=0, k=0;
clrscr();
cout<<"\n\n enter the program code: (to STOP input type End) \n";
do
{
gets(s[i].line);
}
while(strcmpi(s[i++].line,"END"));
k=k-1;
do
{
k++;
for(i=0; s[k].line[i]!='\0'; i++, j++)
{
if(s[k].line[i]==' ')
{
t[j]='\0';
j=-1;
check(t);
}
else
t[j]=s[k].line[i];
}
t[j]='\0';
j=0;
check(t);
}
while(strcmpi(s[k].line,"END"));
getchar();
}
Wednesday, 23 October 2019
c++ - how to fix: error LNK1123: failure during conversion to COFF: file invalid or corrupt
Subscribe to:
Post Comments (Atom)
php - file_get_contents shows unexpected output while reading a file
I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print ...
-
I have an app which needs a login and a registration with SQLite. I have the database and a user can login and register. But i would like th...
-
I got an error in my Java program. I think this happens because of the constructor is not intialized properly. My Base class Program public ...
-
I would like to use enhanced REP MOVSB (ERMSB) to get a high bandwidth for a custom memcpy . ERMSB was introduced with the Ivy Bridge micro...
No comments:
Post a Comment