answersLogoWhite

0

#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

12y ago

Still curious? Ask our experts.

Chat with our AI personalities

FranFran
I've made my fair share of mistakes, and if I can help you avoid a few, I'd sure like to try.
Chat with Fran
RossRoss
Every question is just a happy little opportunity.
Chat with Ross
DevinDevin
I've poured enough drinks to know that people don't always want advice—they just want to talk.
Chat with Devin
More answers

int main (void)

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

User Avatar

Wiki User

13y ago
User Avatar

1684

User Avatar

Wiki User

13y ago
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; }