Write a program in QBASIC to print the value of the series: 1,2,4,8,16,32,64
Share
Write a program in QBASIC to print the value of the series: 1,2,4,8,16,32,64
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Explanation:
+8. // if n = 100 (upper limit) int n = 100; for(int i = 1; i <= n; i*=2) { System.out.print(i+" "); } 4th October 2017, 8:30 AM. Dev.
God bless u guys!!!! 4th October 2017, 11:50 AM. Joe Charlse.
#include <stdio.h> int main() { for(int i=1; i<=64; i*=2) { printf("%d\t",i); } return 0; } 29th May 2019, 8:01 AM