Math Is Fun Forum
  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2019-03-16 00:27:46

Zeeshan 01
Member
Registered: 2016-07-22
Posts: 746

Technical Coding

Different Type of Problem

Write a program that compose message in the same fashion as using mobile keypad. The program must receive integer input. When use enter 2 the program outputs letter ‘A’ and if 2 is pressed twice, the letter ‘A’ will disappear from screen and character ‘B’ will appear and if 2 is pressed thrice the letter ‘B’ will disappear and Letter C will appear. To enter ‘AA’ you have to enter number ‘2’ twice with delay. Delay must be as smaller as it is usually in the mobile.

To check a delay between two key press use the following library

#include <time.h>

To get the current time use following function

time(0)

This function will return numeric value of time. You can compute the time difference by getting time at both key press events and test for a fixed time delay to check whether the key press are consecutive or not.


If you want to clear screen use following statement

System(“CLS”);

Similarly find the associated letters with numbers

Requirement.
You cannot use string and character array. Only primitive data types are allowed. You are allowed to use header files that is mentioned or may use other libraries.


M.M.Zeeshan.K

Offline

#2 2019-03-16 20:08:46

Bob
Administrator
Registered: 2010-06-20
Posts: 8,914

Re: Technical Coding

hi Zeeshan 01

You haven't said what you want from this post.  Also what coding language?

Bob


Children are not defined by school ...........The Fonz
You cannot teach a man anything;  you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you!  …………….Bob smile

Offline

#3 2019-03-16 22:49:30

Zeeshan 01
Member
Registered: 2016-07-22
Posts: 746

Re: Technical Coding

C ++ language.


M.M.Zeeshan.K

Offline

#4 2019-03-21 07:02:54

Zeeshan 01
Member
Registered: 2016-07-22
Posts: 746

Re: Technical Coding

Anyone there to solve this problem by program?.


M.M.Zeeshan.K

Offline

Board footer

Powered by FluxBB