Answer to Question #271951 in C++ for gab

Question #271951

#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();

}


1
Expert's answer
2021-11-26T07:08:49-0500
#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();
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS