• Tidak ada hasil yang ditemukan

Tugas Looping.docx

N/A
N/A
Protected

Academic year: 2023

Membagikan "Tugas Looping.docx"

Copied!
1
0
0

Teks penuh

(1)

1. Write a program in C to find LCM of any two numbers using HCF. Go to the editor Test Data :

Input 1st number for LCM: 15 Input 2nd number for LCM: 20 Expected Output :

The LCM of 15 and 20 is : 60

2. Write a C program to check whether a given number is armstrong number or not.

153 = 13 + 53 + 33 Test Data :

Input a number: 153 Expected Output :

153 is an Armstrong number.

3. Write a program in C to check whether a number is a palindrome or not. Go to the editor Test Data :

Input a number: 121 Expected Output :

121 is a palindrome number.

4. Write a program in C to find the sum of the series 1 +11 + 111 + 1111 + .. n terms. Go to the editor

Test Data :

Input the number of terms : 5 Expected Output :

1 + 11 + 111 + 1111 + 11111 The Sum is : 12345

5. Write a c program to check whether a given number is perfect number or not. Go to the editor

Test Data :

Input the number : 28 Expected Output :

The positive divisor : 1 2 4 7 14 The sum of the divisor is : 28 So, the number is perfect.

Referensi

Dokumen terkait

If you want to be able to monitor whether Puppet is running successfully on a number of machines, without having to check each one, you can have Puppet write a timestamp file

a) Write a C program that uses non recursive function to search for a Key value in a given list of integers using Linear search. b) Write a C program that uses non recursive

a cat b ls c mv Exercise 17 Write a C program that takes one or more file/directory names as command line input and reports the following information on the file: a File type b

Test Objective Results 1 To check whether the programs running or not Successfully 2 To check display all option Successfully 3 To check all option are working or not

Write a program to count number of vowels using sets in given string Input : “Hello World”, Output: No.. Write a program to form concatenated string by taking uncommon characters from

Write an algorithm which takes a number N and prints if it is prime or

Write a program to count number of vowels using sets in given string Input: “Hello World”, Output: No.. Write a program to form concatenated string by taking uncommon characters from

[7M] b Write a C program that takes one or more file or directory names as input and reports the following information on the file: i File type ii Number of links iii Read, write