I was wondering if anyone could help me with with a program
I was wondering if anyone could help me with with a program I\'m trying to write.
I need to write a program that will Generate a Random Two-Digit Value. I plan on using two shift registers along with the two 7 segment displays and I need it to work using the PIC16F1829 microcontroller. Either, Assembly or C languages would be great.
Thank you in advance!
I was wondering if anyone could help me with with a program I\'m trying to write.
I need to write a program that will Generate a Random Two-Digit Value. I plan on using two shift registers along with the two 7 segment displays and I need it to work using the PIC16F1829 microcontroller. Either, Assembly or C languages would be great.
Thank you in advance!
I need to write a program that will Generate a Random Two-Digit Value. I plan on using two shift registers along with the two 7 segment displays and I need it to work using the PIC16F1829 microcontroller. Either, Assembly or C languages would be great.
Thank you in advance!
I need to write a program that will Generate a Random Two-Digit Value. I plan on using two shift registers along with the two 7 segment displays and I need it to work using the PIC16F1829 microcontroller. Either, Assembly or C languages would be great.
Thank you in advance!
Solution
C code for random two digit number is
#include <stdio.h>
include <stdlib.h>
int main()
{
int c, n;
printf(\"The two digit random number is \ \");
n = rand() % 100;
printf(\"%d\ \", n);
return 0;
}
Sample output is
The two digit random number is
83
