Hello,
Can anyone tell me the source code for FLAMES game in
Control Language Programming(CLP)of AS/400.



Hello, Can anyone tell me the source code for FLAMES game in Control Language Programming(CLP)of ..

Answer / sujith shetty

#include<iostream.h>
#include<conio.h>
#include<stdio.h>
#include<string.h>

void main()
{ char str1[20];
char str2[20];
int r,x,y,n,count1,count2,points=0;

clrscr();
cout<<"\nPlease enter a boy's name: \n\n";
gets(str1);

cout<<"\nEnter a girl's name: \n\n";
gets(str2);

count1=strlen(str1);
count2=strlen(str2);

for (x=0; x<count1; x++)
{ for (y=0; y<count2; y++)
{ if (str1[x]==str2[y])
points++;
else;}

if(points!=0)
points++;
}

for (n=1; n<count1; n++)
{ if (str1[0]==str1[n])
points++;
else;}

cout<<"\n$Flame match$ \n",points;

r=points%6;
switch®

{
case 1:cout<<"\nFriends";
break;
case 2:cout<<"\nLovers";
break;
case 3:cout<<"\nAnger";
break;
case 4:cout<<"\nMarriage";
break;
case 5:cout<<"\nEngaged";
break;
case 6:cout<<"\nSweethearts";
break;
}

getch();
}

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More Programming Code AllOther Interview Questions

Write a Program for matrix multiplication.

0 Answers   InterGraph,


How can you print an address of a variable?

0 Answers   TCS,


Beautiful is for 012345678 9 and a code for similar word containing the same alphabets

0 Answers  


i wrote from two tables (employee and department) 1.select * from employee,department; (it is cartesian product) but 2.select * from employee department; (?????????????????) by default it displays the employee table,what is the reason it is not taking department ??? mail @ mak2786@gmail.com Arunkumar

1 Answers  


Main frame : I have a PS file. 4 records. I need toread a particular field of that file and then add it up. then write the added field along with all other fields

1 Answers  






import java.awt.*; import java.awt.event.*; public class Agency extends Frame implements ActionListener { Label l1,l2,l3,l4; Button b1; TextField t1,t2; String s1,s2,s3,s4; public static void main(String args[]) { new Agency().setVisible(true); } public Agency() { super("Gas Agency Package"); setSize(1280,800); setBackground(Color.lightGray); setLayout(null); // setLayout(new BorderLayout()); t1=new TextField(20); t1.setBounds(440,150,200,30); t1.setBackground(Color.white); t2=new TextField(20); t2.setBounds(440,180,200,30); t2.setBackground(Color.white); t2.setEchoChar('*'); l1=new Label("Gas Agency Package"); l1.setBounds(400,30,300,50); l1.setFont(new Font("TimesRoman",Font.BOLD,25)); l1.setAlignment(Label.CENTER); l2=new Label("Enter your ID and Passoword"); l2.setFont(new Font("TimesRoman",Font.BOLD,20)); l2.setBounds(270,80,300,50); l3=new Label("Enter ID"); l2.setFont(new Font ("TimesRoman",Font.BOLD,20)); l3.setBounds(270,150,120,50); l4=new Label("Enter Passoword"); l2.setFont(new Font ("TimesRoman",Font.BOLD,20)); l4.setBounds(270,180,140,50); add(l1); add(l2); add(l3); add(t1); add(l4); add(t2); b1=new Button("Login"); b1.setBackground(Color.white); b1.setBounds(400,280,100,70); b1.addActionListener(this); add(b1); } public void actionPerformed(ActionEvent e) { if(e.getSource()==b1) { s3="svce"; s4="svce"; s1=t1.getText(); s2=t2.getText(); if(s1.equals(s3) && s2.equals(s4)) { //System.out.println("password is correct"); MenuForm m= new MenuForm(); m.setVisible(true); //this.dispose(); } else { System.out.println("password not correct"); } this.dispose(); } } } plzzzzzzz xplain me this java code like why i m including this packages n the whole code plzzzzzz

0 Answers  


i am doing my final year project about programming use verilog ,i am new about it so got problem,i want to record the readings of a waveform every 2us use the verilog code ,every ten readings i need to add them together after that i need to compare this series of number to get which one is the biggest , right now i don't know how to use code to store the readings every 2us on a waveform ,pls help me thanks a lot .

0 Answers  


Write code that allows to create only one instance of a class?

0 Answers  


WORKING STORAGE 01 WS-LENGTH PIC 9(1) VALUE 5. 01 DFHCOMMAREA. COPY ABCDEF (COPYBOOK ABCDEF IS HAVING ONLY ONE VARIABLE OF LENGTH X (100).) .. PROCEDUER DIVISION. ... EXEC CICS XCTL PROGRAM (WS-PGM) COMMAREA (DFHCOMMAREA) LENGTH (WS-LENGTH) RESP (WC-RESPONSE) END-EXEC 1. What will be the value of EIBCALEN in program ABCDEF? 2. What will be length of commarea when in ABCDEF? 3. Will such a code thow any error while linking to called program? Thanks in Advance

0 Answers  


How to find the list of users who have two codes su01 and pfcg? thank in advance all.

0 Answers  


Write a sql query to find n'th maximum in the database table.

3 Answers   Oracle,


JasperETL how to install and create simple project explain me clearly fnds iam wtg for ur rply

0 Answers  


Categories