23ec3038 Lab6
23ec3038 Lab6
#include <stdio.h>
int main() {
int num;
int last;
int reverse;
scanf("%d",&num);
while(num!=0){
last=num%10;
reverse=reverse*10+last;
num=num/10;}
return 0;
}
Q.2 Write a program for fabonacci series starting from zero.
#include <stdio.h>
int main() {
scanf("%d", &n);
first = second;
second = next;
return 0;
}
Q.3 Write a program to print the sum of the number .
#include <stdio.h>
int main() {
scanf("%d", &num);
while (num != 0) {
sum += remainder;
return 0;
}
Q.4.Write a program to print the product of the numbers.
#include <stdio.h>
int main() {
scanf("%d", &num);
while (num != 0) {
product *= remainder;
return 0;