answersLogoWhite

0


Best Answer

#include <stdio.h>

main()

{

int a,b;

clrscr();

printf("enter a,b values");

scanf("%d%d",&a,&b);

a=b%10;

printf("\nlucky number %d",a);

getch();

}

User Avatar

Wiki User

11y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

12y ago

int main (void)

{ puts ("Your lucky number is 12"); return 0;}

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

1684

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you write a c-program to calculate lucky number?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Write in BlueJ to print lucky numbers?

To print lucky numbers in java, you must give the following program: class example { static public void main(String[] args) { System.out.println("Lucky number is your favourite number which is your DOB"); } }


Program in 'c' to find the LCM of any given five numbers?

Just write a method or function that calculates the LCM for two numbers at a time. Then calculate the LCM for the first two numbers, get the LCM of the result with the third number, etc.Just write a method or function that calculates the LCM for two numbers at a time. Then calculate the LCM for the first two numbers, get the LCM of the result with the third number, etc.Just write a method or function that calculates the LCM for two numbers at a time. Then calculate the LCM for the first two numbers, get the LCM of the result with the third number, etc.Just write a method or function that calculates the LCM for two numbers at a time. Then calculate the LCM for the first two numbers, get the LCM of the result with the third number, etc.


Write a java that computes the value of 2?

Compute means to calculate. What do you want to "compute", if you already know it is 2? If you want to show the value:System.out.println("Your number is " + 2);Compute means to calculate. What do you want to "compute", if you already know it is 2? If you want to show the value:System.out.println("Your number is " + 2);Compute means to calculate. What do you want to "compute", if you already know it is 2? If you want to show the value:System.out.println("Your number is " + 2);Compute means to calculate. What do you want to "compute", if you already know it is 2? If you want to show the value:System.out.println("Your number is " + 2);


How do you write a program that calculate factorial in javascript?

factorial number Var num= prompt(&quot;enter any number &quot;); Var i=1; Var fact=1; for(i=1;i


Write a program to calculate the sum of the sequence number from 1 to n loop?

public static final int getSum(final int n) { int sum = 0; for(int i = 1; i &lt;= n; ++i) { sum += i; } return sum; }

Related questions

What is cprogram code to insert a node in single link list?

Write Code to Insert a Node in a Single Linked List at any given Position.


What can you write on your nails that has to do with taylor swift with letters?

her lucky number, 13


Why does Taylor swift write the number 13 on herself?

The number 13 is her lucky number and she gets her mum to write it on her right hand. She was born on the 13th December


Write in BlueJ to print lucky numbers?

To print lucky numbers in java, you must give the following program: class example { static public void main(String[] args) { System.out.println("Lucky number is your favourite number which is your DOB"); } }


The sum of p and 9?

If you replace some number for "p", you can calculate the sum. Otherwise, just write it as "p+9" - you can't simplify this.If you replace some number for "p", you can calculate the sum. Otherwise, just write it as "p+9" - you can't simplify this.If you replace some number for "p", you can calculate the sum. Otherwise, just write it as "p+9" - you can't simplify this.If you replace some number for "p", you can calculate the sum. Otherwise, just write it as "p+9" - you can't simplify this.


How do you write lucky in Arabic?

HADHIIDH


How do you write a lucky signature?

mithuroy


How do you you write the possessive form of the name Lucky?

The possessive form of the proper noun Lucky is Lucky's.Example: Lucky's collar has his name on it.


How do you calculate the fifth square of a number?

There's no such thing as "the fifth square" of a number.To calculate any whole-number power of a number, write the number that many timesall on one line, then write the word "times" between them, get your pencil out, and getto work.The 5th power of a number 'N' is'N' times 'N' times 'N' times 'N' times 'N' .


How do you calculate kwh per square foot?

-- Write down the number of kwh -- Write down the number of square feet -- Divide the first number by the second number. -- The answer is mathematically correct, but doesn't appear to have any physical significance in the real world.


Is the correct adjective for this phrase if your lucky or if you're lucky?

"If you're lucky" is the correct spelling of the phrase. Since you mean to write, "If you are lucky," you must include the apostrophe to indicate the contraction.


Program in 'c' to find the LCM of any given five numbers?

Just write a method or function that calculates the LCM for two numbers at a time. Then calculate the LCM for the first two numbers, get the LCM of the result with the third number, etc.Just write a method or function that calculates the LCM for two numbers at a time. Then calculate the LCM for the first two numbers, get the LCM of the result with the third number, etc.Just write a method or function that calculates the LCM for two numbers at a time. Then calculate the LCM for the first two numbers, get the LCM of the result with the third number, etc.Just write a method or function that calculates the LCM for two numbers at a time. Then calculate the LCM for the first two numbers, get the LCM of the result with the third number, etc.