#include<stdio.h>
#include<conio.h>
void main(){
int num1, num2;
int temp=0;
printf("Enter two numbers");
scanf("%d %d" ,&num1,&num2);
while(((num1 + num2) % 5) !=0)
{
temp=num1+num2;
num1=num2;
num2= temp;
printf("%d",temp);
}
getch();
}
#include<stdio.h>
#include<conio.h>
int main()
{
int num1, num2;
int temp=0;
printf("Enter two numbers:");
scanf("%d %d",&num1,&num2);
while(((num1+num2)%5)!=0)
{
temp=num1+num2;
num1=num2;
num2=temp;
printf("%d ",temp);
}
_getch();
}
Comments
Leave a comment