def thrive(n):if n % 15 == 0:print("thrive", end = " ")elif n % 3 != 0 and n % 5 != 0:print("neither", end = " ")elif n % 3 == 0:print("three", end = " ")elif n % 5 == 0:print("five", end = " ")thrive(35)thrive(56)thrive(15)thrive(39)
num1 = 15num2 = 12sum = num1 + num2print("Sum of {0} and {1} is {2}" .format(num1, num2, sum))
#include iostreamTake input : 60 80using namespace std;int sum(int a, int b ) {int result;result = a + b;return (result);}int main () {int a ;int b ;int result;cout"enter the value of a and b"endl;cinab;result = sum(a, b);cout "Total value is :" result endl;return 0;}
counter = 1sum = 0while counter = 6:sum = sum + countercounter = counter + 2print(sum)