Question about Advanced Graphics Programming Using OpenGL

Ad

Pseudo is

-> integer type count =0;

->Take input from user 'Number'

->loop from 0th to 24th element

->Compare each element with user entered number and if it matches then do count++.

finally display the count.

Posted on Aug 10, 2010

Ad

Hi there,

Save hours of searching online or wasting money on unnecessary repairs by talking to a 6YA Expert who can help you resolve this issue over the phone in a minute or two.

Best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.

Here's a link to this great service

Good luck!

Posted on Jan 02, 2017

Ad

Below is the program written in Turbo C.

#include<stdio.h>

void pw(long,char[]);

char *one[]={" "," one"," two"," three"," four"," five"," six"," seven","

eight"," Nine"," ten"," eleven"," twelve"," thirteen"," fourteen","

fifteen"," sixteen"," seventeen"," eighteen"," nineteen"};

char *ten[]={" "," "," twenty"," thirty"," forty"," fifty"," sixty","

seventy"," eighty"," ninety"};

void main()

{

long n;

clrscr();

printf("

Enter any 9 digit no: ");

scanf("%9ld",&n);

if(n<=0)

printf("Enter numbers greater than 0");

else

{

pw((n/10000000),"crore");

pw(((n/100000)%100),"lakh");

pw(((n/1000)%100),"thousand");

pw(((n/100)%10),"hundred");

pw((n%100)," ");

}

getch();

}

void pw(long n,char ch[])

{

(n>19)?printf("%s %s ",ten[n/10],one[n%10]):printf("%s ",one[n]);

if(n)printf("%s ",ch);

}

#include<stdio.h>

void pw(long,char[]);

char *one[]={" "," one"," two"," three"," four"," five"," six"," seven","

eight"," Nine"," ten"," eleven"," twelve"," thirteen"," fourteen","

fifteen"," sixteen"," seventeen"," eighteen"," nineteen"};

char *ten[]={" "," "," twenty"," thirty"," forty"," fifty"," sixty","

seventy"," eighty"," ninety"};

void main()

{

long n;

clrscr();

printf("

Enter any 9 digit no: ");

scanf("%9ld",&n);

if(n<=0)

printf("Enter numbers greater than 0");

else

{

pw((n/10000000),"crore");

pw(((n/100000)%100),"lakh");

pw(((n/1000)%100),"thousand");

pw(((n/100)%10),"hundred");

pw((n%100)," ");

}

getch();

}

void pw(long n,char ch[])

{

(n>19)?printf("%s %s ",ten[n/10],one[n%10]):printf("%s ",one[n]);

if(n)printf("%s ",ch);

}

Aug 06, 2010 | Borland Turbo C++ Suite 1.0...

In the cell that you
want the result to appear in, enter the appropriate formula from the following
examples.

How to Count the Occurrences of a Number

Use this formula

=SUM(IF(range=number,1,0))

where range is the range that you want to search, and number is the number that you want to count.

NOTE: This formula must be entered as an array formula. To enter an array formula, press CTRL+SHIFT+ENTER.

How to Count the Occurrences of a Text String

Method 1

Use this formula

=SUM(IF(range="text",1,0))

where range is the range that you want to search, and text is the text that you want to find (the text must be enclosed in quotation marks).

NOTE: The above formula must be entered as an array formula. To enter an array formula, press CTRL+SHIFT+ENTER.

Method 2

Use the COUNTIF() function to count the occurrences of a text string. For example, use the formula

=COUNTIF(range,"text")

where range is the range of cells that you are evaluating, and text is the text string that you want to count instances of (note that text must be enclosed in quotation marks).

NOTE: This formula must be entered as an array formula. To enter an array formula, press CTRL+SHIFT+ENTER.

Wildcard characters can be used within the COUNTIF function.

The asterisk character (*) represents more than one character. For example, to count all the cells in the range a1:a10 that contain an "x," you can use the following formula:

=COUNTIF(a1:a10,"*x*")

The question mark character (?) can also be used to represent one wildcard character -- for example, to count all cells in the range whose second character is the letter, such as "ax" or "bx."

=COUNTIF(a1:a10,"?x*")

How to Count the Occurrences of a Number

Use this formula

=SUM(IF(range=number,1,0))

where range is the range that you want to search, and number is the number that you want to count.

NOTE: This formula must be entered as an array formula. To enter an array formula, press CTRL+SHIFT+ENTER.

How to Count the Occurrences of a Text String

Method 1

Use this formula

=SUM(IF(range="text",1,0))

where range is the range that you want to search, and text is the text that you want to find (the text must be enclosed in quotation marks).

NOTE: The above formula must be entered as an array formula. To enter an array formula, press CTRL+SHIFT+ENTER.

Method 2

Use the COUNTIF() function to count the occurrences of a text string. For example, use the formula

=COUNTIF(range,"text")

where range is the range of cells that you are evaluating, and text is the text string that you want to count instances of (note that text must be enclosed in quotation marks).

NOTE: This formula must be entered as an array formula. To enter an array formula, press CTRL+SHIFT+ENTER.

Wildcard characters can be used within the COUNTIF function.

The asterisk character (*) represents more than one character. For example, to count all the cells in the range a1:a10 that contain an "x," you can use the following formula:

=COUNTIF(a1:a10,"*x*")

The question mark character (?) can also be used to represent one wildcard character -- for example, to count all cells in the range whose second character is the letter, such as "ax" or "bx."

=COUNTIF(a1:a10,"?x*")

on Nov 11, 2013 | Microsoft Excel Computers & Internet

first arrange your array in ascending order.and keep the two variables one for starting index and one for last index

then check your number with center(center = (first index + last index))/2 element of array.

if it is lager then center element then set first index = center,

if smaller then last index = center

else you got the number..

then check your number with center(center = (first index + last index))/2 element of array.

if it is lager then center element then set first index = center,

if smaller then last index = center

else you got the number..

Jul 25, 2010 | Borland Turbo C++ Suite 1.0...

coding in C++

#include<iostream.h>

#include<conio.h>

#define max 50

void main()

{

clrscr();

int arr[max],size=0;

int i=0,j=0,temp;

do

{

cout<<"Enter the size of array(less than or equal to 50)";

cin>>size;

} while(size>50);

for(i=0;i<size;i++){

cout<<"Enter a number";

cin>>arr[i];

}

for( i=1;i<size;i++){

for(j=0;j<size;j++){

if(arr[j+1]>arr[j]){

temp = arr[j];

arr[j] = arr[j+1];

arr[j+1] = temp;

}

}

}

cout<<”Array in descending order”;

for(i=0;i<size;i++){

cout<<arr[i]<<"\n";

}

getch();

return 0;

}

Mar 09, 2010 | Computers & Internet

You may download the Instruction / User Guide from Here

Oct 06, 2009 | Lexmark X7350 All-In-One InkJet Printer

Hi.

I suggest creating an Array of Cards (cardOne,cardTwo,etc. to five)

If you can enter them in one at a time, after declaring the array, assign the values to the array.

cin < cardOne; (Psuedo code by the way, hope you don't mind)

Afterwards, you'll have an array with 5 cards.

Declare what full houses, flushes, etc would require.

Use an if statement (If you don't mind lots of code) to compare the entered Array against possible hands.

I didn't necessarily give you any specific C++ code. However, if you Google C++ user input, you should find plenty of commands that may help you.

Good Luck

(And not sure about Linear search to be honest, you can use a Linear search, but if you did it the way I explained, you just have to compare hand to a series of conditionals.)

I suggest creating an Array of Cards (cardOne,cardTwo,etc. to five)

If you can enter them in one at a time, after declaring the array, assign the values to the array.

cin < cardOne; (Psuedo code by the way, hope you don't mind)

Afterwards, you'll have an array with 5 cards.

Declare what full houses, flushes, etc would require.

Use an if statement (If you don't mind lots of code) to compare the entered Array against possible hands.

I didn't necessarily give you any specific C++ code. However, if you Google C++ user input, you should find plenty of commands that may help you.

Good Luck

(And not sure about Linear search to be honest, you can use a Linear search, but if you did it the way I explained, you just have to compare hand to a series of conditionals.)

Sep 23, 2009 | Computers & Internet

Need help doing your homework?

Here's a solution, written in BASIC:

10 PRINT, "Hello World"

20 EXIT

Here's a solution, written in BASIC:

10 PRINT, "Hello World"

20 EXIT

May 11, 2009 | Dell Computers & Internet

this is from the Ford owners manual.

**
Programming a personal entry code**

To create your own personal entry code:

1. Enter the factory set code.

2. Within five seconds press the 1 • 2 on the keypad.

3. Enter your personal 5-digit code. Each number must be entered

within five seconds of each other.

4. The doors will again lock then unlock to confirm that your personal

keycode has been programmed to the module.

**
Tips:**

• Do not set a code that uses five of the same number.

• Do not use five numbers in sequential order.

• The factory set code will work even if you have set your own personal

code.

• If you set a second personal code it will erase your first personal code.

1. Enter the factory set code.

2. Within five seconds press the 1 • 2 on the keypad.

3. Enter your personal 5-digit code. Each number must be entered

within five seconds of each other.

4. The doors will again lock then unlock to confirm that your personal

keycode has been programmed to the module.

• Do not use five numbers in sequential order.

• The factory set code will work even if you have set your own personal

code.

• If you set a second personal code it will erase your first personal code.

Mar 30, 2009 | 2003 Ford F150 Regular Cab

Write a program to prompt the user to input several lines of input. A line of inputs is terminated by '*'. For each readline of input the program should output:(use pointer notation for the array)
. The total # of words
. The lenght of the longest word in the line
At the end the program should output:
. The total number of words read in all lines of input
. The lenght of the longest word read in all lines of input

Jan 19, 2009 | Computers & Internet

Jun 22, 2013 | Advanced Graphics Programming Using OpenGL...

972 people viewed this question

Usually answered in minutes!

×